[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gawk cannot control the use of interval expressions from within a pr
Re: gawk cannot control the use of interval expressions from within a program
Fri, 5 Nov 2004 12:05:54 +0000
On Thu, Nov 04, 2004 at 07:40:21PM -0300, Ruy Exel wrote:
> Is it possible to make gawk understand interval expressions (like when it is
> given the option --re-interval) from within a gawk program?
> I want to run a gawk program via the `#!' script interpreter and I do not know
> how to pass options to gawk in this case. I attempted to start my script with
> the line:
> #!/usr/bin/gawk --re-interval -f
> but it does not work.
That's not a problem with awk, that's a problem with your system
she-bang handling. The above would work with FreeBSD or MacOSX,
but wouldn't in most other Unices.
Because the she-bang generally accept one single argument. On
Linux, gawk would be called with the "-re-interval -f" argument.
On Solaris, it would be called with "-re-interval" argument and
not "-f" argument.
You can do it as:
#! /bin/sh -
":" +0 && "exec" "/usr/bin/gawk" "-Wre-interval" "-f" "$0"
<Your gawk script goes here>
- Re: gawk cannot control the use of interval expressions from within a program,
Stephane Chazelas <=