You can try this simple script

$ cd /home/x
$ for MyFile in *
> do
> NEW_FILE=`echo ${MyFile} | sed -e 's/\ /\_/g' -`
> mv "${MyFile}" "${NEW_FILE}"
>done


Hope this helps

-jon-





On 2/16/06, Jesus Enerio Jr. <[EMAIL PROTECTED]> wrote:
Mga bro (& sis if meron) ask ko lang po a little about
cli, paano po i-rename all files/directory in a
directory using simple bash commands.

Specially if d files/directories is separated by
spaces? like: "/home/x/my files..." to
"/home/x/my_files..."

jessjr

_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph

Reply via email to