[LAU] another scripting question

Sebastian Tschöpel tschoseb at tu-cottbus.de
Mon Feb 18 12:14:17 EST 2008

Hi Dave,

the command would be:

ps -A | grep jackd

If the output is null, there's no jackd process running. Else, there is
some information-output about a jackd process

24131 ?        00:00:00 jackd

Assign the command to a variable and use an if-statement with something

if $myvariable="" ...

that should do the job....

Best regards,

Web: linuxaudioblog.sternenhejim.de

On Mon, 2008-02-18 at 11:54 -0500, Dave Phillips wrote:
> 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
> running. If it is, I'll run an app (e.g. xine or AlsaPlayer)
> 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 ?
> Similarly, I'd like to display an option to launch JACK if it isn't 
> already running, but I think I can figure that one for myself. :)
> Best,
> dp
> _______________________________________________
> Linux-audio-user mailing list
> Linux-audio-user at lists.linuxaudio.org
> http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user

More information about the Linux-audio-user mailing list