the next program should print the words
First
Second
Third
But since the parameter i from awk does not get the value from the "for" loop, it prints all the words:
First second third
First second third
First second third
How to fix awk to first type the "first" word, "second" word, etc.
THX
Yael
program:
for i in 1 2 3
do
echo "first second third" | awk '{print $i}'
done
source
share