On Sun, Mar 08, 2009 at 08:50:25PM +0100, Michael Wagner wrote:

> -----------------------------------------------------+
> #! /bin/bash                                         |
>                                                      |
> if [ $(pgrep -x script.sh) ]; then <script here>; fi |

Again: if runs a command as a test. Using '[' (test) is not a
requirement.

if pgrep -x script.sh >/dev/null; then ...

(The above would also be a syntax error if you get two matches)

-- 
Tzafrir Cohen         | tzaf...@jabber.org | VIM is
http://tzafrir.org.il |                    | a Mutt's
tzaf...@cohens.org.il |                    |  best
ICQ# 16849754         |                    | friend


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to