On Tue, Mar 18, 2003 at 04:09:53AM -0500, Mike Simons wrote:
> On Tue, Mar 18, 2003 at 12:58:01AM -0800, Bill Kendrick wrote:
> > i want to replace 'tin' with a shell script or alias that will
> > test for a lock file (and call me a moron if it exists), make a lock file,
> > run tin, and then delete the lock file...
> 
> =====
> #! /bin/bash
> 
> LOCK=$HOME/.tin.lock
> 
> lockfile $LOCK
> tin
> rm -f $LOCK
> =====
> 
> "lockfile" is part of the procmail package.
> 
>   if you ^C the script, you will have to clean up and delete the lockfile
> on your own.  there are a few ways for the script to automatically
> detect tin was killed, but you didn't ask for that.  ;)

There are a bunch of good shell scripting techniques that may yield some
purchase on your problem in O'Reilly's "Unix Power Tools". (There is a copy
in the LUGOD library.)

-- 
Henry House
The attached file is a digital signature. See <http://romana.hajhouse.org/pgp>
for information.  My OpenPGP key: <http://romana.hajhouse.org/hajhouse.asc>.

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to