From eaf85b0bad7eb3765ede4311430a9b9a30293248 Mon Sep 17 00:00:00 2001 From: q Date: Tue, 13 Nov 2012 19:56:54 +0200 Subject: [PATCH] --- conv1to2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conv1to2 b/conv1to2 index 6ca9fb5..10658ee 100755 --- a/conv1to2 +++ b/conv1to2 @@ -2,15 +2,15 @@ IFS=$'\n' if [ -z "$1" ] -then echo give two strings +then echo rename files in current folder replacing arg1 with arg2. exit fi for file in $( ls | grep "$1" ) -do mv -iv "$file" "$( echo $file | sed s/"$1"/"$2"/g )" +do echo "$file" '->' "$( echo $file | sed s/"$1"/"$2"/g )" done echo 'sure?' read i for file in $( ls | grep "$1" ) -do echo mv -iv "$file" "$( echo $file | sed s/"$1"/"$2"/g )" +do mv -iv "$file" "$( echo $file | sed s/"$1"/"$2"/g )" done