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 ?


This seems to work:

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

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

This email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
Jackit-devel mailing list
[hidden email]