Re: [SLUG] Awk Question

From: Robert Haeckl (rhaeckl@tampabay.rr.com)
Date: Tue Nov 06 2001 - 09:57:47 EST


Ronan Heffernan wrote:
>
> 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

Ronan, correct me if I'm wrong. I don't think that you can put two
parameters on the she-bang line because it is interpreted by the kernel,
not the shell.

I think I'm in over my head arguing with Ronan.

-Robert



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 16:57:06 EDT