[Gllug] Parsing strings in a shell script
Mark Hill
lists at mark.ukfsn.org
Thu Sep 9 20:54:50 UTC 2004
On Thu, Sep 09, 2004 at 09:18:01PM +0100, Dylan wrote:
>
> but I can't work out how to strip everything except the artist name
> (leaving just David Bowie) I figured I could use:
>
> dylan at scooby(1):/media/server/music/test> ogginfo "David Bowie - Blue
> Jean.ogg" | grep ARTIST | sed 's/ ARTIST=//'
> ARTIST=David Bowie
> dylan at scooby(1):/media/server/music/test>
>
> but no!
I think something like the following would work:
$ ogginfo track01.ogg | grep ARTIST | sed s/^.*ARTIST=//
Did you use preceding spaces in your sed expression? If so, I think that
might have been the problem with your example. The output given by
ogginfo uses a preceding /tab/.
--
Mark Hill
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list