Hi guys, I get a difficulty to produce the desired output using awk. i want to use for loop bash variable as the input to the awk variable here is the illustrated input:
line_1 line_2 line_3 line_4 line_5 line_6 line_7 line_8 line_9 line_10 here is the desired output: line_1 line_2 line_3 here is what i do: cat input | for (( i=1;i<=3;i++ )); do gawk -v var=$i 'NR == var { print}'; done but, the result is always: line_1 i would be glad if somebody help me. Thanks. Greetings, Marco -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAD9kJ0M6Dd8tZ2-kxO5D=ia+hzraho+61nypn50qtkj-yvv...@mail.gmail.com