Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. oldwhtman

    Passing Parameters to an Executable Awk Script

    Thanks again for your time and promptness in helping me . But your solution seems a bit complex, but informative. I didn't realize I could delete ARGV. That is good to know. However, I think a simpler solution for my purposes would be to utilize the fact that a parameter containing the "="...
  2. oldwhtman

    Passing Parameters to an Executable Awk Script

    The script fragment I wrote in my original post. However, thinking it wasn't relevent, I left out the detail block, which apparently changes how the parameters are interpreted. Here's my example again with detail processing: #!/bin/gawk -v "var=$1" -f begin { print "var=" var } { print }
  3. oldwhtman

    Passing Parameters to an Executable Awk Script

    Thanks, feherke.ga, but this does not work when processing a text file. My example omitted the detail procesccing. Your example works because there is no 'detail' processing of a text file. My script tries to interpret all parameters as files to be processed.
  4. oldwhtman

    Passing Parameters to an Executable Awk Script

    I've spent as couple hours searching in vain for an example of how to pass parameters to an executable awk script. Can anyone lead me to such an example? I tried the following syntax: #!/bin/gawk -v "var=$1" -f begin { print "var=" var } Using the command: >myscript.awk <value>...

Part and Inventory Search

Back
Top