Is there a \"canonical\" way of doing that? I\'ve been using head -n | tail -1 which does the trick, but I\'ve been wondering if there\'s a Bash tool that speci
head -n | tail -1
To print nth line using sed with a variable as line number:
a=4 sed -e $a'q:d' file
Here the '-e' flag is for adding script to command to be executed.