[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tail bug?
From: |
Jim Meyering |
Subject: |
Re: tail bug? |
Date: |
Mon, 05 Oct 2009 08:48:35 +0200 |
Eric Blake wrote:
> $ echo abc | tail -c +1
> tail: cannot open `+1' for reading: No such file or directory
> $ echo abc | tail -c+1
> abc
> $ tail --version | head -n1
> tail (GNU coreutils) 7.6
>
> Shouldn't -c behave the same, whether or not there is a space before the
> count argument?
Thanks for the report.
However, it seems you have set _POSIX2_VERSION=199209 in your
environment, or you've built with older header files.
It works fine for me on GNU/linux (Fedora rawhide):
$ echo abc | env -i ./tail -c+1
abc
$ echo abc | env -i ./tail -c +1
abc
However, if I set that envvar, I see what you reported:
$ echo abc | _POSIX2_VERSION=199209 ./tail -c +1
./tail: cannot open `+1' for reading: No such file or directory
You need at least the 200112 setting to get the more sensible behavior:
$ echo abc | _POSIX2_VERSION=200112 ./tail -c +1
abc
- tail bug?, Eric Blake, 2009/10/03
- Re: tail bug?,
Jim Meyering <=