Path: utzoo!attcan!uunet!bu.edu!rpi!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!audfax!arnold From: arnold@audiofax.com (Arnold Robbins) Newsgroups: comp.unix.questions Subject: Re: Exit Value from Awk Message-ID: <242@audfax.audiofax.com> Date: 18 Jul 90 16:21:22 GMT References: <1990Jul17.203037.22283@ccu.umanitoba.ca> Organization: AudioFAX Inc., Atlanta Lines: 16 In article <1990Jul17.203037.22283@ccu.umanitoba.ca> mills@ccu.umanitoba.ca (Gary Mills) writes: >Does anyone know how to set the exit code from awk within an awk >script? Yes. Simply say exit in the action part of a rule. The value of will be the exit value of awk itself. The expression is optional, in which case awk will exit with 0. This works on all variants of awk. -- Arnold Robbins AudioFAX, Inc. | Laundry increases 2000 Powers Ferry Road, #220 / Marietta, GA. 30067 | exponentially in the INTERNET: arnold@audiofax.com Phone: +1 404 933 7600 | number of children. UUCP: emory!audfax!arnold Fax: +1 404 933 7606 | -- Miriam Robbins