bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gawk] Passing Parameters to Gawk Executable Script


From: Mitchell Pryor
Subject: [bug-gawk] Passing Parameters to Gawk Executable Script
Date: Fri, 28 Feb 2014 08:41:43 -0800 (PST)

This may not be a bug, but it seems like one to me.

Script:

#!/bin/gawk -v num=$1 -f
BEGIN {
    print "num=" num
}

When I try to execute this script as follows why does it say that 'num' is an illegal variable?

./myscript <some-number> <some-text-file>

Is '-f' the only allowable switch for gawk within an executable format?  I can't find any documentation addressing this specific situation.

Thanks for any help you can give.

Mike


reply via email to

[Prev in Thread] Current Thread [Next in Thread]