arguments to echo cmd (contains sensitive language)

Jeff Lo jlo at ucbvax.ARPA
Thu Apr 11 07:25:36 AEST 1985


> > 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 at ucbvax
CSNET: jlo%ucbvax at csnet-relay



More information about the Comp.unix mailing list