This commit is contained in:
6
conv1to2
6
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
|
||||
|
||||
Reference in New Issue
Block a user