RE: [SLUG] A little off topic

From: Jason Copenhaver (jcopenha@typedef.org)
Date: Thu Jul 11 2002 - 11:09:07 EDT


in that case change the perl script from

tr/ /-/

to

s/ //g

On Thu, 11 Jul 2002, Carson Wilcox wrote:

> The problem is, I need the newfilename to be the old file name
> with the spaces removed.
>
> Carson
>
>
> ---------- Original Message ----------------------------------
> From: "Milner, Dick" <RMILNER@healthplan.com>
> Reply-To: slug@nks.net
> Date: Thu, 11 Jul 2002 10:24:11 -0400
>
> >how about:
> >find -type f | tr ' ' '-' > newfilename
> >
> >??
> >
> >-----Original Message-----
> >From: Carson Wilcox [mailto:carsonwilcox@mail.arczip.com]
> >Sent: Thursday, July 11, 2002 10:01 AM
> >To: slug@nks.net
> >Subject: [SLUG] A little off topic
> >
> >
> >I need to remove the spaces from all the file names in a
> directory.
> >
> >The command:
> > find -type f | tr ' ' '-'
> >
> >Replaces all the spaces with a '-' and prints it to stdout,
> >however I can't figure out how to actually rename the file.
> >
> >I thought that
> > find -type f | tr ' ' '-' | xargs cp
> >
> >might work, but that barfed all over it self, any ideas
> >appreciated.
> >
> >Thanks,
> >Carson
> >
>
>
>



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 13:39:35 EDT