Re: [LAU] another scripting question

From: Sebastian Tschöpel <tschoseb@email-addr-hidden-cottbus.de>
Date: Mon Feb 18 2008 - 19:14:17 EET

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
like...

if $myvariable="" ...

that should do the job....

-- 
Best regards,
Sebastian.
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
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 ?
> 
> 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@email-addr-hidden
> http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user
> 
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user
Received on Mon Feb 18 20:15:03 2008

This archive was generated by hypermail 2.1.8 : Mon Feb 18 2008 - 20:15:03 EET