Re: another scripting question

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: another scripting question

Kjetil Matheussen

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?)

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel