How to display certain line from a text file in Linux?
March 9, 2019 Leave a comment
Sometimes script fails and error mentiones the line number, where there is a mistake. One option is to open a file and go to the mentioned line.
I am going to show you how to use SED to print only the certain line from the script file:
# sed -n ’80p’ /u01/app/18.3.0/grid/crs/script/mount-dbfs.sh
“My 80th line”
Where 80 is the line number and p “print[s] the current pattern space”