On Mon, 04 Feb 2008 22:00:19 +0100, BartlebyScrivener wrote:
> Is there a script I could make that I could use to start mutt, and if
> mutt were already running, then it could just take me to the already-
> running instance of it, instead of starting a new mutt?

Hacked up from a little perlish I had hanging around

my @running
`/bin/ps -aefw |/bin/grep 'perl' |/bin/grep 'mutt'|/bin/grep -v 'grep'`;
if (scalar @running > 1) {
        die "mutt already running\n";
} else {
    system("mutt");
}

-- 
Stephen Patterson :: [EMAIL PROTECTED] :: http://patter.mine.nu/
GPG: B416F0DE :: Jabber: [EMAIL PROTECTED] 
"Don't be silly, Minnie. Who'd be walking round these cliffs with a gas oven?"


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to