NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/37954: "tail -c 2" broken
>Number: 37954
>Category: bin
>Synopsis: "tail -c 2" broken
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Feb 04 15:25:00 +0000 2008
>Originator: Thomas Klausner
>Release: NetBSD 4.99.52
>Organization:
>Environment:
System: NetBSD hiro 4.99.52 NetBSD 4.99.52 (HIRO64) #2: Mon Feb 4 14:29:50 CET
2008 wiz@hiro:/usr/src/sys/arch/amd64/compile/obj/HIRO64 amd64
Architecture: x86_64
Machine: amd64
>Description:
tail -c 2 is broken. It should display the last two characters of its input.
Output on NetBSD for -c 1 to -c 3 is:
# echo -n abc | tail -c 3; echo
abc
# echo -n abc | tail -c 2; echo
b
# echo -n abc | tail -c 1; echo
c
For comparison, with tail (GNU coreutils) 5.97:
# echo -n abc | tail -c 3; echo
abc
# echo -n abc | tail -c 2; echo
bc
# echo -n abc | tail -c 1; echo
c
>How-To-Repeat:
See above.
>Fix:
>Unformatted:
Home |
Main Index |
Thread Index |
Old Index