Hi,
I have a file split.txt with the following contents
one
two
three
four
five
Suppose if i want to display contents of line 3, I know this could be achieved using the command
sed -n '3p' split.txt
But I need the line number to be decided dynamically like
a=3
sed -n '$ap' split.txt
But the above command doesnt work as sed -n '3p' split.txt. So how could I display the contents of a line whose line number is decided dynamically (or) how could I display the contents of a file using line numbers