Do you have a question? Post it now! No Registration Necessary. Now with pictures!
April 17, 2007, 1:24 pm
rate this thread
to search a directory tree and change all occurances of
underscore to dash inside the files.
What if you want to change directory names?
What if you want to change file names?
find $1 -depth -name '*_*' -type d -print |
sed 's/./\&/g' |
awk -F/ -vOFS=/ '
gsub(/_/, "-", $NF)
system("<&3 mv -i -- " old " " new)
...use the same script, but change -type d to -type f