Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 2
    awk knows how to read files, no need for cat, and I suspect that the OP wants to be able to read the patterns from a file at runtime Commented Dec 22, 2016 at 13:09
  • args contains the arguments of a script. I'm not supposed to know what args contains. Commented Dec 22, 2016 at 13:10
  • @mike-m1342 is args inside a flat file or are they actual script arguments? If they are script arguments, you can just use the positional parameters in awk ($1, $2, etc). Hopefully that helps, but perhaps I still don't fully understand your goal. Commented Dec 22, 2016 at 13:16
  • args is a file. But I placed there the script arguments. How to use awk with all arguments at once? Commented Dec 22, 2016 at 13:22