I expect the output to be 4, I need to pass the field name through a C- shell script to the Awk script (key.awk) to get the field number corresponds to the given name.
When I integrate the field name directly in the Awk script, I get the correct the result, otherwise I do not get any results when I use the -v option.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.