On Mittwoch, 2. Januar 2008, Fabian Richter wrote:
> Am Wed, 02 Jan 2008 07:29:02 +0100
>
> schrieb Michael Reinelt <mi...@re...>:
> > I'm not sure if I understand what you are trying to do... could you
> > please provide an example?
>
> Something like that Michael:
>
> grep Title /tmp/xmms-info | sed -e s/Title:\ //g | sed -e s/^.*\ \-\ //g
>
> or
>
> grep Title /tmp/xmms-info | gawk -F": " '{ print $2}' | gawk -F" - "
> '{ print $1}'
>
The pipe syntax is usually provided by the shell, so you can probably get it
to work by calling /bin/sh directly and giving your little script as argument
to the -c option:
/bin/bash -c 'grep Title /tmp/xmms-info | gawk ... |'
Need to be carefull about single tics inside the command, and keep in mind
that a shell invocation can slow things down quite a bit, depending on the
config files it has to parse (~/.bashrc, .profile and the like)
HTH
/Ernst
|