项目作者: serpent7776

项目描述 :
regular expression based file renamer
高级语言: C
项目地址: git://github.com/serpent7776/rer.git
创建时间: 2014-10-28T20:14:34Z
项目社区:https://github.com/serpent7776/rer

开源协议:BSD 2-Clause "Simplified" License

下载


rer

regular expression based file renamer

rer is a tool that rename files that matches given pattern.
Each file name given as argument is matched against pattern.
If a match is found file is renamed according to given replacement using PCRE regular expression.

Usage

  1. rer /pattern/replacement/modifiers file [file [...]]

Examples

rename foobar to foobaz

  1. $ rer /bar/baz/ foobar

Swap first word with second, renaming foo-bar to bar-foo, foo-baz to baz-foo and foo-123 to 123-foo

  1. $ rer '/(\w+)-(\w+)/\2-\1/' foo-bar foo-baz foo-123