Path: utzoo!utgpu!water!watmath!clyde!rutgers!rochester!cornell!uw-beaver!teknowledge-vaxc!mkhaw From: mkhaw@teknowledge-vaxc.ARPA (Mike Khaw) Newsgroups: comp.unix.questions Subject: Re: Fun with ignoreeof Message-ID: <20535@teknowledge-vaxc.ARPA> Date: 24 Jan 88 21:15:55 GMT References: <2248@tekcrl.TEK.COM> Organization: Teknowledge, Inc., Palo Alto CA Lines: 22 + alias exit 'echo "Use ^D to exit"' + alias logout 'echo "Use ^D to logout"' + + They are there only as a joke, but they got me thinking. Suppose I + also say "set ignoreeof". How do I logout? No fair using unset or + unalias or alias -- they give any number of obvious two-liners. Can + I do it with a one-liner? (Using ";" is cheating too :-). + + My first impulse was "\exit" or "\logout". No dice, since a leading + \ to undo aliases also undoes builtins. This soon led me to exec; + the first quiet one I tried was "exec true"; it worked. kill -KILL $$ However, this can leave stopped jobs lying around. Now, what if both "kill" and "exec" have been aliased to something useless? Mike Khaw -- internet: mkhaw@teknowledge-vaxc.arpa usenet: {uunet|sun|ucbvax|decwrl|uw-beaver}!mkhaw%teknowledge-vaxc.arpa USnail: Teknowledge Inc, 1850 Embarcadero Rd, POB 10119, Palo Alto, CA 94303