Christophe LYON wrote: > Matthew Woehlke wrote: >> Christophe LYON wrote: >>> But 'man tail' says: >>> -n, --lines=N >>> output the last N lines, instead of the last 10; or use >>> +N to output lines starting with the Nth >>> >>> does it mean that '-n' is mandatory before a number? I interpreted it >>> as '-number'.
Try it with a different option letter that I will make up right now to be 'y' instead of 'n'. If it said this following it might be easier to read. (Of course it can't because the option letter is 'n' not 'y' but just for illustration.) -y, --lines=N (Using -y for illustration only, not for real.) output the last N lines, instead of the last 10; or use +N to output lines starting with the Nth Then of course the option would always be -y, right? You would never be tempted to replace the option letter with the argument to it. tail -y 3 tail -y +3 It is only because 'n' and 'N' are different cases of the same letter that people's minds play tricks on them. > But I still don't see where '-3' is documented? Matthew quoted the section of the documentation that describes this in his mail. Please read that section again. > As mentioned earlier, at release 6.0 (approx), using '-3' stopped > working. I remember I read the coretuils standard conformance doc at > that time to understand the issue, and started modifying my scripts to > use '-n 3' instead. Any a few coreutils releases later, I noticed '-3' > worked again, but I guess I never understood why. So, I still don't :-) The -COUNT style is different from the +COUNT style. Those are two different and independent issues. For a while the -COUNT style was removed but now it has returned. As additional information on this please read the FAQ entry on it here. http://www.gnu.org/software/coreutils/faq/#Old-tail-plus-N-syntax-now-fails Bob _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils