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