[Gllug] Swapping two parts of a filename...
Dylan
dylan at dylan.me.uk
Thu Jun 3 09:19:26 UTC 2004
On Thursday 03 Jun 2004 00:34 am, Mike Brodbelt wrote:
> On Wed, 2004-06-02 at 23:40, Dylan wrote:
> > > $ touch "Track Name - Artist Name.mp3"
> > > $ ls
> > > Track Name - Artist Name.mp3
> > > $ /bin/ls -C1 | sed "s/\(.*\) - \(.*\).mp3/mv \"&\" \"\2 -
> > > \1.mp3\"/"|sh $ ls
> > > Artist Name - Track Name.mp3
> > >
> > >
> > > Adjust your regex to fit...
> >
> > Well, I'll trust it does what you say (will try it on a test file
> > first!) but it looks like gobledygook to me so adjusting the
> > expression to fit will be fun!
>
<SNIP explanation>
Thanks Mike - that short explanation was worth more than two hours
scratching my head at regex docs. I think they are starting to make
sense at last.
Cheers
Dylan
--
"I see your Schwartz is as big as mine"
-Dark Helmet
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list