Posts Get only a certain line out of a huge file in linux
Post
Cancel

Get only a certain line out of a huge file in linux

Assuming you need lines 32 to 34 out of a large file.

using awk

1
awk 'FNR>=32 && FNR<=34' <nameofthefile>

using sed

1
sed -n '32,34p;45q' <nameofthefile>
This post is licensed under CC BY 4.0 by the author.