mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-15 10:55:52 +02:00
rename: Remove extra escaping (#2850)
This commit is contained in:
parent
209ceee876
commit
948147d383
1 changed files with 5 additions and 5 deletions
|
@ -4,20 +4,20 @@
|
|||
|
||||
- Rename files using a Perl Common Regular Expression (substitute 'foo' with 'bar' wherever found):
|
||||
|
||||
`rename {{'s/foo/bar/'}} {{\*}}`
|
||||
`rename {{'s/foo/bar/'}} {{*}}`
|
||||
|
||||
- Dry-run - display which renames would occur without performing them:
|
||||
|
||||
`rename -n {{'s/foo/bar/'}} {{\*}}`
|
||||
`rename -n {{'s/foo/bar/'}} {{*}}`
|
||||
|
||||
- Force renaming even if the operation would overwrite existing files:
|
||||
|
||||
`rename -f {{'s/foo/bar/'}} {{\*}}`
|
||||
`rename -f {{'s/foo/bar/'}} {{*}}`
|
||||
|
||||
- Convert filenames to lower case (use `-f` in case-insensitive filesystems to prevent "already exists" errors):
|
||||
|
||||
`rename 'y/A-Z/a-z/' {{\*}}`
|
||||
`rename 'y/A-Z/a-z/' {{*}}`
|
||||
|
||||
- Replace whitespace with underscores:
|
||||
|
||||
`rename 's/\s+/_/g' {{\*}}`
|
||||
`rename 's/\s+/_/g' {{*}}`
|
||||
|
|
Loading…
Add table
Reference in a new issue