From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joel Salomon To: 9fans@cse.psu.edu Subject: Re: [9fans] is there any good reason why awk does this? In-Reply-To: <02d901c37090$6f9d7ee0$b9844051@insultant.net> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Date: Mon, 1 Sep 2003 13:41:09 -0400 Topicbox-Message-UUID: 283f362e-eacc-11e9-9e20-41e7f4b1d025 On Mon, 1 Sep 2003, boyd, rounin wrote: > i think awk should be able to exit with a string like everything > else does/should with exits(). > Taking the original example: >brahma% awk 'END {exit "foo"}' /dev/null ; echo $status > >brahma% awk 'END {exit 1}' /dev/null ; echo $status >awk 8186: 1 I would guess that awk *is* using exits() but first exit converts is arg to a number (if necessary), presumably for compatability w/ unix awk, then converts the num to a string which gets sent to exits(). Ugh. --Joel