Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


David Hummel wrote:
| On Tue, Dec 07, 2004 at 06:52:55PM +0000, John Chambers wrote:
| > Jerry Feldman writes:
| > >
| > > Yup. It's there. In general I use Kill -TERM gnome Where Kill is my
| > > script that greps the ps output.
| >
| > Funny; I have a script by the same name that does the same thing.
| It's generally a bad idea to give a script the same name as a system
| command (unless it's some kind of wrapper for that command, and even
| then be careful).  Just add .sh, .bash, .pl, whatever.

That's why Jerry's script is "Kill" rather than "kill". ;-)

One case where this convention really blew up on OSX was that I had a
wrapper  for the "find" command, called "Find".  Never mind just what
it did; when it finally tried to call "find" to do the work, the name
matched the "Find" in my ~/sh directory, which was in the search path
before  /usr/bin  or  wherever  "find"  was.   So  it  called  itself
recursively.  That copy did the same thing ...

The solution was to rename "Find" to "", and add  "alias  Find"  to  my  rc file.  The caseless matching is only in the file
system, and shell aliases are still caseful.

But recovering from the behavior of the original  "Find"  required  a
reboot,  as  keyboard input was apparently of lower priority than the
madly-scrolling Terminal window  and  the  WindowServer.   A  lot  of
reboots, actually, since I was determined to get to the bottom of the
insane behavior.  The code should have been portable ...

I didn't have the nerve to test the "Kill" script.

BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!

Boston Linux & Unix /