[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Head -n argument position matters
From: |
Jim Meyering |
Subject: |
Re: Head -n argument position matters |
Date: |
Sat, 20 Apr 2002 00:20:09 +0200 |
User-agent: |
Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2.50 (i686-pc-linux-gnu) |
Thanks for the report.
That's the expected behavior, because options like `-1'
are obsolete. If you want to be able to put an option after
non-option arguments, you have to use the newer form: `-n 1'.
FYI, there is now another reason to switch away from using `head -N':
With the latest test release I get this:
$ env _POSIX2_VERSION=200112 head -1
head: `-1' option is obsolete; use `-n 1'
Try `head --help' for more information.
[Exit 1]
Of course, by default it doesn't fail or even issue a warning.
But the writing is on the wall...
Edward Avis <address@hidden> wrote:
> % head -1 foo
> This is the first line of foo.
> % head foo -1
> head: invalid option -- 1
> Try `head --help' for more information.
> % head --version
> head (textutils) 2.0.21