Moving files

Michael O'Donnell mod+gnhlug at std.com
Mon Jan 6 11:02:30 EST 2003


One approach:

 - Create a script named (say) /tmp/renameSpaces
   which consists of the single command:

      mv $* `echo $* | sed -e 's/ /_/g'`

 - Mark that script executable:

      chmod a+x /tmp/renameSpaces

 - Then say

      find yourMP3directory -type f -exec /tmp/renameSpaces {} \;


And I'm sure our local Perl wizards will inform us that a
single line of Perl code like

   $@&*^%__++mp3

already handles this exact problem.  BTW, I'll take
this opportunity to mention that I am in the process
of writing my very first Perl program.  Ick and ouch.




More information about the gnhlug-discuss mailing list