Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!sun-barr!lll-winken!cert!netnews.upenn.edu!eniac.seas.upenn.edu!shuque From: shuque@eniac.seas.upenn.edu (Sumon Huque) Newsgroups: comp.unix.questions Subject: Re: How to alias EXIT or any CSH command Message-ID: <40217@netnews.upenn.edu> Date: 1 Apr 91 21:34:03 GMT References: <1991Apr1.165435.4687@berlioz.nsc.com> Sender: news@netnews.upenn.edu Reply-To: shuque@eniac.seas.upenn.edu (Sumon Huque) Organization: University of Pennsylvania Lines: 15 Nntp-Posting-Host: eniac.seas.upenn.edu In article <1991Apr1.165435.4687@berlioz.nsc.com> nelson@berlioz.nsc.com (Taed Nelson) writes: > >I have reason to desire an alias for the CSH command EXIT. Since > the executable version doesn't exist anywhere, I can't do: > alias exit 'MY_STUFF_HERE; /usr/bin/exit' > or whatever. > >Anyone have a solution? Try this: alias exit 'MYSTUFF; kill -HUP $$' Recall, the variable $ contains the process number of the current shell.