I've seen that it has been suggested to use awk to show e.g. the 50th line in a file
awk 'NR==50{print;exit}' file
What about if instead of a number I try to use a variable? e.g. COUNT
awk 'NR==$COUNT{print;exit}' file
awk 'NR==${COUNT}{print;exit}' file
I can't make it work,
Thanks,