Can anybody point me to a script that removes a certain character from a list of files? Currently I'm using the C-shell.
for i in list of files; do mv -f $i $(echo $i | tr " \(\)\[\]\{\}/_/g" "_"); done
for i in `ls /path/to/files/`; do mv -f $i $(echo $i | tr " \(\)\[\]\{\}/_/g" "_"); done
for i in `ls /path/to/files/`; do mv -f $i $(echo $i | sed 's/Ä/_/g') | sed 's/Å¡/_/g' | sed '/Ä“/_/g'; done
for i in `ls`;
do newname=`echo $i | sed 's/string_to_replace/new_string/g'`;
mv $i $newname;
done
removes a certain character from a list of files?
Feel difference ?removes a certain character from filenames?
Alt said:Feel difference ?
J65nko said:For a similar discusion see http://www.daemonforums.org/showthread.php?t=2565
find . -name "* *"| while read file
do
rename "$file" "`echo "$file"| nawk ' BEGIN {OFS="-"} $1=$1 '`"
done