Re: anyone have a script to change : to - in file and dir names?


Subject: Re: anyone have a script to change : to - in file and dir names?
From: Lee Sheridan (lsherida@nccs.gsfc.nasa.gov)
Date: Wed Jun 13 2001 - 11:30:55 EDT


On Wed, Jun 13, 2001 at 10:08:18AM -0500, Danny Sauer wrote:

> for F in `find /path/to/files -name '*:*'`; do mv "$F" "`echo $F | sed 's/:/-/g'`"; done

You may want to check out the "--backup" option in GNU mv since you want
to make sure you don't irreversably clobber an existing file.

Or if you're doing it interactively the "-i" option.

-- 
Lee Sheridan                            301.286.5898 voice
NASA / Goddard Space Flight Center      lsherida@nccs.gsfc.nasa.gov
Computer Sciences Corporation           Building 28, Room S241
Code 931
 
"Some people without brains do an awful lot of talking, don't they?"
                                           -- Scarecrow, The Wizard of Oz



This archive was generated by hypermail 2b28 : Sun Oct 14 2001 - 03:04:42 EDT