Re: Renaming files with spaces in the name to files without spaces..

2003-01-09 Thread parv
in message <[EMAIL PROTECTED]>, wrote Stijn Hoop thusly... > > On Fri, Jan 10, 2003 at 01:49:18AM +1030, Rob wrote: > > > If you want to do it for all files in a directory: > > > > > > # for file in *; do mv "$file" `echo $file | sed -e 's/ /_/g'`; done ^

Re: Renaming files with spaces in the name to files without spaces..

2003-01-09 Thread Unix Tools
, 2003 10:05 PM Subject: Re: Renaming files with spaces in the name to files without spaces.. > Paste this into your shell: > > XXX="RESULTS OF JAN 01 2002.txt " > YYY=${XXX%% } > ZZZ=$(echo ${YYY} | tr ' ' '_') > > for III in "$XXX&q

Re: Renaming files with spaces in the name to files without spaces..

2003-01-09 Thread Stijn Hoop
On Fri, Jan 10, 2003 at 01:49:18AM +1030, Rob wrote: > > If you want to do it for all files in a directory: > > > > # for file in *; do mv "$file" `echo $file | sed -e 's/ /_/g'`; done > > > > should do the trick. I think Perl is overkill for something this simple. > > Someone else suggested tr, wh

Re: Renaming files with spaces in the name to files without spaces..

2003-01-09 Thread BigBrother (BigB3)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 10 Jan 2003, Rob wrote: > > > Sorry for this OT but I am trying for some hours to achieve a massive > > > rename of files using a simple script and I have not success yet. I want > > > to rename files like > > > > > > "RESULTS OF JAN 01 2002

Re: Renaming files with spaces in the name to files without spaces..

2003-01-09 Thread Rob
> > Sorry for this OT but I am trying for some hours to achieve a massive > > rename of files using a simple script and I have not success yet. I want > > to rename files like > > > > "RESULTS OF JAN 01 2002.txt " > > > > to > > > > "RESULTS_OF_JAN_01_2002.txt" > > > > i.e. all the spaces, being su

Re: Renaming files with spaces in the name to files without spaces..

2003-01-08 Thread Chris Doherty
On Wed, Jan 08, 2003 at 06:01:50PM +0200, BigBrother (BigB3) said: > -BEGIN PGP SIGNED MESSAGE- > Sorry for this OT but I am trying for some hours to achieve a massive > rename of files using a simple script and I have not success yet. I want > to rename files like there is already a gene

Re: Renaming files with spaces in the name to files without spaces..

2003-01-08 Thread parv
in message <[EMAIL PROTECTED]>, wrote BigBrother (BigB3) thusly... > > Sorry for this OT but I am trying for some hours to achieve > a massive rename of files using a simple script and I have not > success yet. I want to rename files like > > "RESULTS OF JAN 01 2002.txt " > > to > > "RESULTS_OF_

Re: Renaming files with spaces in the name to files without spaces..

2003-01-08 Thread Paul Everlund
On Wed, 8 Jan 2003, BigBrother (BigB3) wrote: > Sorry for this OT but I am trying for some hours to achieve a massive > rename of files using a simple script and I have not success yet. I want > to rename files like > > "RESULTS OF JAN 01 2002.txt " > > to > > "RESULTS_OF_JAN_01_2002.txt" > > i.e.

Re: Renaming files with spaces in the name to files without spaces..

2003-01-08 Thread Gary W. Swearingen
Paste this into your shell: XXX="RESULTS OF JAN 01 2002.txt " YYY=${XXX%% } ZZZ=$(echo ${YYY} | tr ' ' '_') for III in "$XXX" "$YYY" "$ZZZ"; do echo "'$III'" done To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message

RE: Renaming files with spaces in the name to files without spaces..

2003-01-08 Thread Yonatan Bokovza
> -Original Message- > From: BigBrother (BigB3) [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 08, 2003 18:02 > To: [EMAIL PROTECTED] > Subject: Renaming files with spaces in the name to files > without spaces.. > > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > Sorry f