Arthur wrote:
head -1 /etc/motd
or
sed 1q < /etc/motd
It's good conversation has moved onto sed given head was presumably
created by someone that saw tail existed and didn't know their sed well
enough, but the `1q' that keeps appearing can be just `q'. :-)
IIRC Brian Cantrell complains in a video interview that head didn't
exist, even though tail did, and it took "them" to create it, presumably
the BSD or Sun lot? (He's also one of the few interviewees that talk
fast enough for a video to be bearable compared to reading at one's own
pace.)
I use `sed 3q', etc., so often that I've ~/bin/3q for various sizes just
to save that typo of seq for sed; handy for checking the output of a
pipeline so far when a screenful would push off useful history.
--
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy