Skip to content
walkerhound edited this page Sep 20, 2012 · 3 revisions

To print out a specific line (line x) in a file:

sed -n 'x+1q;xp'

For example, to print out line 20,

sed -n '21q;20p'

Go back to System Administration

Clone this wiki locally