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.

5
  • Thank You. The Script file worked for me. But I assigned like this var=$1. Commented Aug 10, 2018 at 12:29
  • how do you specify the infile inside the script file itself? Commented May 25, 2022 at 17:13
  • @ychaouche By taking the first or second command in this answer and making that into a shell script (which just means adding #!/bin/sh as the first line and making the file executable). Commented May 25, 2022 at 17:34
  • thanks @Kusalananda. I out there's another solution where you set ARGV[1] and ARGC to 2 inside the BEGIN block. Source Commented May 26, 2022 at 11:56
  • @ychaouche If that works for you, then go with that. It's an unusual and awkward way to misuse the internal command line argument variables, and I would never suggest writing code like that. Commented May 26, 2022 at 12:04