-
Notifications
You must be signed in to change notification settings - Fork 0
/
rer.1
49 lines (49 loc) · 1.44 KB
/
rer.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
.\" Man page for rer
.\" Contact [email protected] to correct errors or omissions.
.TH rer 1 "" 0.1
.SH NAME
rer - regular expression file renamer
.SH SYNOPSIS
rer [options] /pattern/replacement/modifiers file [file [...]]
.SH DESCRIPTION
rer is tool that rename files that matches given pattern.
.Pp
Each file name given as argument is matched against pattern.
If a match is found file is renamed according to given replacement using pcre(3) compatible regular expression.
.P
Recognized options:
.IP "--dry-run"
do not actually rename files, just print what would be done
.IP "--help"
print short usage summary and quit
.IP "--version"
print version info and quit
.P
Recognized modifiers:
.IP "'g'"
global mode; replace all occurences of pattern in file name instead of only first.
.IP "'i'"
Makes pattern case-insensitive.
.IP "'x'"
Use PCRE_EXTENDED flag: ignore whitespace in pattern and allow for coments.
.IP "'U'"
Inverts the "greediness" of the quantifiers, so they are not greedy.
.SH EXAMPLES
.P
Rename file foobar to foobaz
.IP
rer /bar/baz/ foobar
.P
Swap first word with second, renaming foo-bar to bar-foo, foo-baz to baz-foo and foo-123 to 123-foo
.IP
rer "/(\\w+)-(\\w+)/\\2-\\1/" foo-bar foo-baz foo-123
.P
Change foo to bar ignoring case: this will rename FOOBAR to barBAR, foobar to barbar
.IP
rer /foo/bar/i *
.SH SEE ALSO
mv(1), pcre(3)
.SH AUTHOR
Serpent7776 ([email protected])
.SH BUGS
report here: https://github.com/serpent7776/rer/issues