I have two environments: Mac and Linux.
I wonder about the head command:
it can show just 2 lines of text if I invoke it like so:
vim --version | head -2
I saw this online and ran to the man page to learn more only to discover that neither the osx nor the linux pages have any information that I could decipher describing the possibility of using
-2 directly to get just 2 lines of text from stdin.
So my questions are:
- am I reading the man pages wrong?
- if so, what indicates the possibility of specifying
- if not, is it common for recognised options not to be explicitly outlined in the man page?
- if not in man, where should I look for full disclosure on a command's options?
- are there many other convenient features like this, which objectively make head much nicer and direct to use, that I am oblivious to and can't learn about by studying
-houtput and/or a man page?
osx OS X v10.8.3 (build 12D78)
linux GNU/Linux (kernel 3.5.0-25-generic) Ubuntu 12.10
coreutils GNU coreutils 8.12.197-032bb