echo command always prints its arguments

David Messer dave at circadia.UUCP
Thu Apr 11 16:57:22 AEST 1985


> On every UNIX system I have ever used, there is no way to prevent
> the echo command from printing its arguments.  I would like to
> propose a "-q" option to echo which tells it to be quiet and go about
> its work without printing its arguments.

Yes, this IS a major flaw in UNIX.  I have often wanted to do this.
Here is a shell script that I use and hope that you can also use:

------CUT------CUT------CUT------CUT------
#!sh
for i in $*
do
	case $i in
		-q)	exit ;;
	esac
done
echo $*
#:-)

-- 

Dave Messer   ...ihnp4!stolaf!umn-cs!circadia!dave



More information about the Comp.unix mailing list