find /mnt/mp3player -type f | while read; do mv "$REPLY" "$(echo "$REPLY" | sed -e 's/ /_/g')"; done
And remember: before any run of loop with rm in it, run it with echo rm instead of rm to see what will happen..
edit: added -type f to find, so that directories are not messed up.
Last edited by raskin; 07-31-2006 at 01:48 PM.
|