From 2ab1bbefcdd30a34f8ea871db32b7c5e931af44d Mon Sep 17 00:00:00 2001 From: Blake Bourque Date: Thu, 25 Jun 2015 22:35:13 -0400 Subject: [PATCH] add the regex for whitespace replace Ubuntu's rename (included in perl 5.14.2) does not include -c or --nows --- pages/common/rename.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pages/common/rename.md b/pages/common/rename.md index 17f1d00f1..caa35fe4f 100644 --- a/pages/common/rename.md +++ b/pages/common/rename.md @@ -2,7 +2,7 @@ > renames multiple files -- Change foo to bar in matching files +- Change foo to bar in matching filenames `rename {{'s/foo/bar/'}} {{*.txt}}` @@ -12,4 +12,9 @@ - Replace whitespace with underscores -`rename --nows {{*.txt}}` +`rename --nows {{*.txt}}` +`rename 's/\s+/_/g' {{*.txt}}` + +- No action, just show what renames would occur + +`rename -n {{'s/foo/bar/'}} {{*.txt}}`