Re: [SLUG] Awk Question

From: Ronan Heffernan (ronan.heffernan@mindspring.com)
Date: Tue Nov 06 2001 - 18:00:08 EST


Paul M Foster wrote:

This is an obscure one, just for you awk gurus.

I have some scripts which begin:

#!/bin/mawk -We

Paul-
   Have you tried telling gawk to use the script as input? I don't know
if it will have trouble ignoring the first line ("#!/bin/mawk") or not.
 If so, you could use grep to make a temp copy without that line.
 Anyway, maybe change the first line to "#!/bin/gawk -f $0" . You will
probably get an error, however, when gawk is finished and the rest of
the "script" tries to execute. Maybe you could clobber the existing
process by using some form of "exec" so that when gawk exits, the
process that was the script, terminates.
--ronan



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 16:56:25 EDT