[LAU] another scripting question

Kjetil S. Matheussen k.s.matheussen at notam02.no
Mon Feb 18 12:17:50 EST 2008


Dave Phillips:
>
> Greetings,
>
> I'd like to add some conditional tests to my simple scripts. For
> example, I want to query the system to determine whether JACK is already
> running. If it is, I'll run an app (e.g. xine or AlsaPlayer) configured
> for JACK. If JACK is not running, I'll run the app without it.
>
> So how do I test for JACK in a simple bash shell script ?
>

Hi,

This seems to work:

if jack_lsp >/dev/null 2>/dev/null ; then
   echo "running"
else
   echo "not running"
fi


I'm not sure if its the best way though. (what if jack_lsp changes in
a later version?)



More information about the Linux-audio-user mailing list