I have an awk script that is being called:
awk -f myawkfile.awk arguments
awk script is called in my bash script using the same call mentioned.
Can I declare it as a function in my bash script instead of calling awk script. I thought it would be easy by writing awk
in front and back ticking all the code, and then assigning a function name to the call as desired. Somehow this doesn't do the trick.
I am trying to do this because I do not want my script to depend on another script. And I'm not the one who wrote the awk
script. It takes the file as input, does some, and returns the modified file that is used in my script.
source share