Re: too many mutts
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 :: steve@patter.mine.nu :: http://patter.mine.nu/
GPG: B416F0DE :: Jabber: patter@jabber.earth.li
"Don't be silly, Minnie. Who'd be walking round these cliffs with a gas oven?"
Reply to: