Exit Value from Awk

Gunter Steinbach steinbac at hpl-opus.HP.COM
Thu Jul 19 02:04:34 AEST 1990


On p.  50 of the awk bible "The AWK programming Language", by A., W.,
and K. themselves, it says that the statement "exit <expression>" will
return <expression> as the program's exit value.  I tried it with things
like
awk 'END {exit 1}' < /dev/null || print "ok"

and it works.  I highly recommend the book, by the way.  Addison-Wesley
is the publisher.

(This was "awk" on HP-UX 6.5 on an HP9000/350 work station.)

Good luck -

	 Guenter Steinbach		gunter_steinbach at hplabs.hp.com



More information about the Comp.unix.questions mailing list