commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Prints exactly 15th line of $file. You can also specify a range:
sed -n '2,18p' $file - this will print lines 2 to 18, inclusive.
Silly approach, but easy to remember...
Nth line of a file - dirty hack way. I haven't used ed in ages ;-)
This is not printing, real editing using the text editor.