bob@cadovax.UUCP (Bob "Kat" Kaplan) (04/09/85)
> 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."
jlo@ucbvax.ARPA (Jeff Lo) (04/10/85)
> > 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