[Gllug] Processing filenames containing " with sed
Dylan
dylan at dylan.me.uk
Fri Jun 4 09:46:05 UTC 2004
On Friday 04 Jun 2004 00:04 am, Mike Brodbelt wrote:
<SNIP>
> You can stick another sed in the pipeline to escape the quotes. Like
> so:-
>
> $ /bin/ls -C1 |
>
> > sed s/\"/\\\\\"/ |
> > sed "s/\(.*\) - \(.*\).mp3/mv \"&\" \"\2 - \1.mp3\"/" |
> > sh
Thanks - I took an easier route and renamed them all to eliminate the
quotes first.
>
> If you want to do anything uglier, you should probably use perl :-).
Hmmm Can't say it's quite that important
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