Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I was trying to use the script below:
number_of_lines=1
number=1until [ "$number" -gt "$number_of_lines" ]
doecho $number
awk '{ if (NR == $number) print $1, $2, $3, $4 }' file_input
expr $number + 1 > temp_number
read number < temp_number
done
when I echo $number it gives me 1,2, 3
.... so on but with the comparison if (NR == $number) I was expecting the awk command would print the first record of the file_input. But I do get nothing.Any comments, please

![]() |
how do you install damn s...
|
linux os for an old Amd k...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |