Exit Value from Awk

Guy Harris guy at auspex.auspex.com
Thu Jul 19 04:40:29 AEST 1990


>Does anyone know how to set the exit code from awk within an awk
>script?

Set the exit code without exiting, no.  Exit with a particular exit
code, yes:

	$ awk 'END { exit 17 }' </dev/null
	$ echo $?
	17

If this isn't documented, it should be....



More information about the Comp.unix.questions mailing list