Roberto,
I normally try to use an alias in a case like that. An alias would have
escaped that trap, I think.
Chuck
On Tue, 24 May 2005, Roberto C. Sanchez wrote:
Be careful what you wish for. Today I decided, instead of doing my
homework, that I was going to start learning mutt. I normally localize
my system to es_ES, but this makes the default key bindings not make
sense when I look at a UI in Spanish. I decided to whip up a two line
shell script called mutt:
#!/bin/sh
LANG=C mutt
I placed in ~/bin, which ordinarily, would not be a problem. The
problem came with this:
$ echo $PATH
/home/sanchezr/bin:/home/sanchezr/bin:/usr/local/bin:/opt/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
This way, when I typed `mutt' at the command line, I would hit the `mutt'
in ~/bin and not the one in /usr/bin. Naturally, since I did not
specify an explicit path to the `mutt' in my script, my invocation
caused a fork to execute mutt, which happened to be the shell script, since
it was before the binary in /usr/bin. Imagine my surprise when it
fairly locked my machine up and consumed all my memory (1 GB) and swap
(another 1 GB) in about a minute with fork after fork racing to execute
the `mutt' in ~/bin.
I fixed the script like this:
#!/bin/sh
LANG=C /usr/bin/mutt
Hopefully, someone gets a chuckle out of this.
-Roberto
--
The Moon is Waning Gibbous (97% of Full)
But you can download some things from http://www.mhcable.com/~chuckh
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]