friedl@vsi.UUCP (Stephen J. Friedl) (02/26/88)
In article <3002@codas.att.com>, mikel@codas.att.com (Mikel Manitius) writes: > > The best joke to play on a novice: > > PS1="login: " Second best joke to play on novice: $ cat > README README: permission denied ^D $ Especially fun if they know chmod, even more fun if they are a novice root. -- Life : Stephen J. Friedl @ V-Systems, Inc/Santa Ana, CA *Hi Mom* CSNet: friedl%vsi.uucp@kent.edu ARPA: friedl%vsi.uucp@uunet.uu.net uucp : {kentvax, uunet, attmail, ihnp4!amdcad!uport}!vsi!friedl
mike@turing.UNM.EDU (Michael I. Bushnell) (02/28/88)
The discussion about aliasing "alias" led me to the following trick: % alias "unalias" \\unalias % alias "alias" \\alias The recorded alias for unalias is '\unalias', and that for alias is '\alias'. Now, when someone types 'alias', the shell turns that into '\alias', and then, the backslash suppresses alias expansion, and the shell tries to execute the program 'alias'. It ends up printing "alias: command not found.". Of course, the same thing happens for unalias. There is no way out short of starting a new csh. --Mike Michael I. Bushnell Internet: mike@turing.unm.edu UUCP: mike@turing.unm.edu Bitnet: mike@turing.unm.edu CSnet: mike@turing.unm.edu YourFavoriteNet: mike@turing.unm.edu Golly, don't domains make everything simpler? For peoply who run UUCP but haven't switched over to smail *yet*, you can try {ucbvax,gatech}!unmvax!turing!mike. Or write: {Box 295, Coronado Hall} or {Computer Science, Farris Engineering Center} University of New Mexico Albuquerque, NM 87131 Or call: (505)277- [2992=dorm][6116=work] I work for the CS department. But don't blame them.
lvc@tut.cis.ohio-state.edu (Lawrence V. Cipriani) (02/28/88)
This is one I pull now and then on new ksh users: alias ls='echo "ksh: ls: not found"; unalias ls' It usually about week before they figure out what's going on and look in their ENV file. -- oo Larry Cipriani, AT&T Networks Systems (by day) Ohio State University (by night) Domain: lvc@tut.cis.ohio-state.edu Path: ...!cbosgd!osu-cis!tut.cis.ohio-state.edu!lvc (yes its right)
landauer@morocco.Sun.COM (Doug Landauer) (03/01/88)
> % alias "unalias" \\unalias > % alias "alias" \\alias > > Now, when someone types 'alias', the shell turns that into '\alias', > and then, the backslash suppresses alias expansion, and the shell > tries to execute the program 'alias'. It ends up printing "alias: > command not found.". Of course, the same thing happens for unalias. > There is no way out short of starting a new csh. I suppose this depends on what version of "csh" you're using on what operating system, but SunOS lets you escape this trap pretty easily. The first thing I tried was to type % ''unalias unalias % unalias alais This is one easy way out; I'm sure there are others.
richard@aiva.ed.ac.uk (Richard Tobin) (03/03/88)
In article <827@unmvax.unm.edu> mike@turing.UNM.EDU.UUCP (Michael I. Bushnell) writes: > % alias "unalias" \\unalias > % alias "alias" \\alias > ... >There is no way out short of starting a new csh. False. What you need is something that happens after alias expansion, but before built-in detection. Like variable substitution. For example: aiva% alias "unalias" \\unalias aiva% alias "alias" \\alias aiva% unalias alias unalias: Command not found. aiva% aiva% set b=unalias aiva% $b unalias aiva% unalias alias aiva% -- Richard Tobin, JANET: R.Tobin@uk.ac.ed AI Applications Institute, ARPA: R.Tobin%uk.ac.ed@nss.cs.ucl.ac.uk Edinburgh University. UUCP: ...!ukc!ed.ac.uk!R.Tobin