My Code is in mid of manipulating two input files.
awk -F'|' -v PARM_VAL="${PARM_VALUE[*]}" '
BEGIN { split(PARM_VAL,pa," ") }
FNR==NR
{
for(i=1;i<=NF;i++)
a[NR,i]=$i;
}
END {printf "second value of SPPIN : "a[2,2]", parm : "pa[2]", File val : " FILENAME "First rec of SPPOUT: " $0 ;printf "\n" } ' SPP_IN SPP_OUT
I am passing parm array to awk, storing first input file in array. Just executed the above command. My first input file is getting displayed without print. Anyway to suppress or avoid it?
SPP_OUT) file anywhere in that script (well you print the last line from that file in theENDblock I suppose). You appear to be printing the second field from the second line of theSPP_INfile (after storing the entire file in memory for some reason) and also the second field of thePARM_VALUEarray and the name of the last file (SPP_OUTin this case) that was processed.