From owner-freebsd-questions Tue Feb 3 18:02:59 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA18531 for questions-outgoing; Tue, 3 Feb 1998 18:02:59 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from awfulhak.org (awfulhak.demon.co.uk [158.152.17.1]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA18432 for ; Tue, 3 Feb 1998 18:02:38 -0800 (PST) (envelope-from brian@Awfulhak.org) Received: from gate.lan.awfulhak.org (localhost [127.0.0.1]) by awfulhak.org (8.8.7/8.8.7) with ESMTP id BAA21583; Wed, 4 Feb 1998 01:36:48 GMT (envelope-from brian@gate.lan.awfulhak.org) Message-Id: <199802040136.BAA21583@awfulhak.org> X-Mailer: exmh version 2.0.1 12/23/97 To: Kwoody cc: freebsd-questions Subject: Re: small script question.. In-reply-to: Your message of "Tue, 03 Feb 1998 12:11:09 PST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 04 Feb 1998 01:36:47 +0000 From: Brian Somers Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG X-To-Unsubscribe: mail to majordomo@FreeBSD.org "unsubscribe questions" > I wrote this little thing: > > #!/bin/sh > ps ax | grep -v grep | grep -q city > if ( test $? -eq 0 ) > then > echo "found" > else > echo "not found" > echo "running ppp..." > ppp -auto -alias city > fi [.....] or: #! /bin/sh killall -0 ppp || ppp -auto -alias city > thanks, > Keith > -- Brian , , Don't _EVER_ lose your sense of humour....