Hi Everyone,
Is there a way I can print specific lines using sed -n '3,3p' file.dat or awk 'FNR==3' file.dat
when using variable?
For example, I have this script (get_line.ksh) that accepts line parameter that a user wanted to print in the file.dat.
file.dat
one
two
three
four
So if the user ran the script with ./get_line.ksh 4, the script would display four. If the user ran the script with ./get_line.ksh 3, the script would display three and so on...
Thanks,
zzavilz