Re: Using stupid filenames in shell scripts
On Thu, May 15, 2003 at 10:57:42PM +0100, Colin Watson wrote:
> On Thu, May 15, 2003 at 10:57:40PM +0200, David Jardine wrote:
> > On Thu, May 15, 2003 at 04:39:52PM +0100, Colin Watson wrote:
> > > On Thu, May 15, 2003 at 04:13:27PM +0200, Joerg Johannes wrote:
> > > > If you are going to produce new mp3's, you will consider naming
> > > > them without spaces. Just replace all spaces with underscores _ .
> > > > If you want to know how to rename all existing files, wait for
> > > > Colin Watson to answer, he is something like the "script guru"
> > > > over here.
> > >
> > > Mmph, am I? Gosh. Personally I'd be inclined to use:
> > >
> > > rename 'y/ /_/' *.mp3
> >
> > Shouldn't that be
> >
> > rename 'y/ /_/g' *.mpg ?
>
> Why? Firstly, y/// doesn't take a /g option (try it, or read perlop(1));
> secondly, he asked for *.mp3 rather than *.mpg.
Yes, of course. I'd actually never heard of the 'y' thing in
sed and my brain(?) had substituted 's' for it. The "mpg" was
a typo. One more thing learnt. Great.
>
> Cheers,
>
> --
> Colin Watson [cjwatson@flatline.org.uk]
>
>
> --
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
--
David Jardine
"Running Debian/GNU Linux and
loving every minute of it." -Sacher M.
Reply to: