[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#17145: head fails with implicit stdin on darwin
From: |
Denis Excoffier |
Subject: |
bug#17145: head fails with implicit stdin on darwin |
Date: |
Sun, 30 Mar 2014 22:40:18 +0200 |
Hello,
head -n -1 -- -
or equivalently
head -n -1
returns immediately (ie does not wait for further stdin) and prints nothing.
I use coreutils 8.22 compiled (with gcc-4.8.2) on top of darwin 13.1.0
(Mavericks).
However the following seem to work perfectly:
head -n 1
head -c -1
cat | head -n -1
head -n -1 ---presume-input-pipe
on cygwin: head -n -1
What is weird on my system is lseek() at the beginning of
elide_tail_lines_file():
lseek(fd, 0, SEEK_CUR) returns a (random?) number, something like 6735, 539 etc.
lseek(fd, 0, SEEK_END) returns 0
Hope this helps,
Regards,
Denis Excoffier.
- bug#17145: head fails with implicit stdin on darwin,
Denis Excoffier <=