This is driving me insane. All I want to do is pass a command to the terminal from awk, where the command is a string concatenated together made from other variables.
The documentation for awk says that something like
"echo" $1 | getline var
should put the value of $1 into var. But this is not the case. What am I missing here?
I should add that I actually have a loop
for ( i = 1; i <=NF ; i=i+1 )
{
"echo" $i | getline var
printf var " "
}
printf "\n"
for inputfile like
0 2
1 2
outputs
0 0
0 0
what the hell.