Hello to all,
Please some awk expert could help me.
If I want to run an awk script as "command" give it inputs externally I do:
Script.sh
Input="$1" # "$1" is the input that will be given to the script
Output=${Input%.*}.csv
awk '{$1=$1}1' $Input | awk '{...}' > $Output
and I run the script like this:
. Script.sh inputfile
Then, the output is inputfile.csv.
That works correctly, but now I have another awk script that uses 2 inputs as follow
awk '{...}' Inputfile1 Inputfile2
What is needed in order that the script accepts the 2 inputs externally similarly as I do with my above script? I mean
run the script like this:
. Script.sh Inputfile1 Inputfile2
Thanks in advance for any help.