Get line number 12 (or n) from a file

sed -n '12p;13q' file
Extracts only file number 12 from file. It's meant for text files. Replace 12 with the number you want. First line starts at 1 not 0. We use q on next line so doesn't process any line more.

By: bugmenot
2021-07-15 20:13:05

What Others Think

Thanks for sharing a amazing post, I have not seen this informative article before. buy followers australia
jamiereade8 · 2 weeks ago
I discovered your this post while looking for data about blog-related assessment and continue posting and supporting data. Call Girls in Jaipur"> Jaipur Escorts Service"> Jaipur Escorts"> Jaipur Call Girls"> Escorts in Jaipur
sumanrajput · 1 week and 6 days ago
I discovered this blog commonly more enlightening than the others I've analyzed as of now. I'm moreover enchanted by the stunning subtleties that you have on this site."> Jaipur Escorts Service"> Jaipur Escorts"> Jaipur Call Girls Escorts in Jaipur"> Call Girls in Jaipur
sumanrajput · 1 week and 6 days ago
I ought to thank you for the endeavors you have made recorded as a printed variety of this article. I'm trusting in an equivalent best work from you later on in addition.
sumanrajput · 1 week and 6 days ago
I was relentlessly checking this blog and I'm spellbound! Unimaginably strong data particularly the last part. I care for such data a ton. I was looking for this specific information for quite a while.
sumanrajput · 1 week and 6 days ago
Thanks for the wonderful share. Your article has proved your hard work and experience you have got in this field. Brilliant .I love it reading. visit the website
harrythomson66 · 1 week and 3 days ago
This is a very well written article. I’ll be sure to bookmark it and come back to read more of your useful info. Thanks for the post. I’ll definitely return. [url=]best SEO company in kochi[/url]
aadityaagarwal · 1 week ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: