Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ucbvax.ARPA Path: utzoo!watmath!clyde!burl!ulysses!ucbvax!jlo From: jlo@ucbvax.ARPA (Jeff Lo) Newsgroups: net.unix,net.bugs Subject: Re: arguments to echo cmd (contains sensitive language) Message-ID: <6135@ucbvax.ARPA> Date: Wed, 10-Apr-85 16:25:36 EST Article-I.D.: ucbvax.6135 Posted: Wed Apr 10 16:25:36 1985 Date-Received: Thu, 11-Apr-85 01:03:19 EST References: <523@cadovax.UUCP> Organization: University of California at Berkeley Lines: 41 Xref: watmath net.unix:4196 net.bugs:598 > > If echo didn't print its arguments, what good would it be?!? > > Even though the original question was an April fool's joke, I have > a valid (?) use of the echo command where I don't want the arguments > printed. > > I wanted the computer to respond appropriately when the user enters > the word 'fuck.' Unfortunately, since echo prints its arguments, the > alias (csh - 4.2 bsd): > > alias fuck 'echo Watch your language, asshole\!' > > produces a conversation as follows: > > % fuck you > Watch your language, asshole! you > > To prevent the echoing of the user's arguments, I used the alias: > > alias fuck 'echo Watch your language, asshole\! ; echo \!* > /dev/null' > -- > Bob Kaplan > > "Our love burns like fire, then turns to ashes." You still don't need echo -q. Just make your alias like this: alias xxx echo foo bar\\\! This just echos foo bar! when run. --- Jeff Lo UUCP: ..!ucbvax!jlo ARPA: jlo@ucbvax CSNET: jlo%ucbvax@csnet-relay