On Wed, 2002-05-15 at 06:53, Miquel van Smoorenburg wrote:
> In article <[EMAIL PROTECTED]>,
> Sure. If your script is called something like "check-xscreensaver"
> the grep finds the script itself.
>
> Why not use "pidof xscreensaver", see man pidof(8)
That was it! The script name was 40xscreensa
On 14 May 2002, Alex Malinovich wrote:
> if ps -A |grep -q "[x]screensaver"; then xscreensaver-command -activate
> else xscreensaver& xscreensaver-command -activate; fi
>
> However, if I put that exact line into a shell script and run it, the if
> ALWAYS gets evaluated as true. Any ideas?
I would
In article <[EMAIL PROTECTED]>,
Alex Malinovich <[EMAIL PROTECTED]> wrote:
>I'm sure that I might be missing something obvious here, but after a few
>hours I still haven't figured it out. I'm writing a script to detect
>whether xscreensaver is running and activate it if it is. If not, it
>launches
On 0, Alex Malinovich <[EMAIL PROTECTED]> wrote:
> On Tue, 2002-05-14 at 22:06, Craig Dickson wrote:
> > I cannot reproduce your symptoms. Whether I type your code in at the
> > shell prompt or run it in a script, it always behaves correctly.
> >
> > You don't say what shell you're using (or what
On Tue, 2002-05-14 at 22:06, Craig Dickson wrote:
> I cannot reproduce your symptoms. Whether I type your code in at the
> shell prompt or run it in a script, it always behaves correctly.
>
> You don't say what shell you're using (or what version); my tests were
> performed using the version of ba
On 0, Alex Malinovich <[EMAIL PROTECTED]> wrote:
> I'm sure that I might be missing something obvious here, but after a few
> hours I still haven't figured it out. I'm writing a script to detect
> whether xscreensaver is running and activate it if it is. If not, it
> launches the daemon first and
begin Sean 'Shaleh' Perry quotation:
> I could be wrong but I think the if is checking whether ps returned
> successfully or not.
I don't think so. It should be checking the return code of the final
command in the pipe, which in this case is grep.
Craig
pgppIOVwsLwO9.pgp
Description: PGP sig
On 15-May-2002 Alex Malinovich wrote:
> I'm sure that I might be missing something obvious here, but after a few
> hours I still haven't figured it out. I'm writing a script to detect
> whether xscreensaver is running and activate it if it is. If not, it
> launches the daemon first and then activa
begin Alex Malinovich quotation:
> I'm sure that I might be missing something obvious here, but after a few
> hours I still haven't figured it out. I'm writing a script to detect
> whether xscreensaver is running and activate it if it is. If not, it
> launches the daemon first and then activates
I'm sure that I might be missing something obvious here, but after a few
hours I still haven't figured it out. I'm writing a script to detect
whether xscreensaver is running and activate it if it is. If not, it
launches the daemon first and then activates. From the command line, the
following retur
10 matches
Mail list logo