A challenge in converting a working bash script into a gawk script is hung up on passing variables for shell interaction. For example, the following is to run within an executable script, ie:
#!/usr/bin/gawk -f
BEGIN {
...
awkvar = 5
awkname = "name"
field = 2
command1 = (./script2.awk awkvar > outputfile""awkname"".txt)
print $1, $field | command1
...
Any ideas?
#!/usr/bin/gawk -f
BEGIN {
...
awkvar = 5
awkname = "name"
field = 2
command1 = (./script2.awk awkvar > outputfile""awkname"".txt)
print $1, $field | command1
...
Any ideas?