storing output of sed in a variable in shell script
How to store output of sed command in a variable in shell script???
1. ls -l >filenames
2. var=`sed -n '5p' filenames` #5th line of the file
3. echo $var
It is not working.
Thanks in advance.