When I run my script, there is no output to the terminal.
This my code:
for ((h = 1 ; h < 4 ; h++ )); do x=$(awk -v i=h -v j=17 \'FNR == i {p
You are saying:
awk -v i=h -v j=17 ...
Note i=h which is equivalent to saying: i=0.
i=h
i=0
It seems that you wanted to say:
x=$(awk -v i=$h -v j=17 'FNR == i {printf "%s ", $j}' newiptables.log) ^ |== refer to the variable h