GNU bug report logs -
#67626
column with -t and piped extends a single line file into multiple lines
Previous Next
To reply to this bug, email your comments to 67626 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#67626
; Package
coreutils
.
(Mon, 04 Dec 2023 16:53:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Remigiusz Suwalski <remigiusz.suwalski <at> protonmail.ch>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Mon, 04 Dec 2023 16:53:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
today I have discovered accidentally that column utility behaves oddly when piped to another command, as shown on example below. I am not sure whether this is a bug or intended behaviour.
First "column" built from sources (commit https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?id=94feb5a20d23904cc15cd857c4e00f35f495116c):
$ echo '_ __ ___ ________ __________ ________' | ./column -t | nl # strange
1 __
2 ___
3 ___
4 _________
5 __________
6 _______
$ echo '_ __ ___ ________ __________ ________' | ./column -t > file.txt # the same issue as above
$ echo '_ __ ___ ________ __________ ________' | ./column -t # expected
_ __ ___ ________ __________ ________
A workaround that works sometimes (on this and some other but not all inputs) is to pass -c 0 option:
$ echo '_ __ ___ ________ __________ ________' | ./column -t -c 0 | nl # expected
1 _ __ ___ ________ __________ ________
Separate binary built from parent commit 3949a48dd1351cea7c523fe97666190359247630 behaves well:
$ echo '_ __ ___ ________ __________ ________' | ./column -t | nl1 _ __ ___ ________ __________ ________
If it matters, the output of "tput cols" command is 252, operating system is Ubuntu 22.04.3 and my locale is as follows:
LANG=C.UTF-8
LANGUAGE=
LC_CTYPE="C.UTF-8"
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_PAPER="C.UTF-8"
LC_NAME="C.UTF-8"
LC_ADDRESS="C.UTF-8"
LC_TELEPHONE="C.UTF-8"
LC_MEASUREMENT="C.UTF-8"
LC_IDENTIFICATION="C.UTF-8"LC_ALL=
Best regards,
Leon Suwalski
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#67626
; Package
coreutils
.
(Mon, 04 Dec 2023 17:09:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 67626 <at> debbugs.gnu.org (full text, mbox):
tag 67626 notabug
close 67626
stop
On 04/12/2023 16:43, Remigiusz Suwalski via GNU coreutils Bug Reports wrote:
> Hi,
> today I have discovered accidentally that column utility behaves oddly when piped to another command, as shown on example below. I am not sure whether this is a bug or intended behaviour.
>
> First "column" built from sources (commit https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?id=94feb5a20d23904cc15cd857c4e00f35f495116c):
> $ echo '_ __ ___ ________ __________ ________' | ./column -t | nl # strange
> 1 __
> 2 ___
> 3 ___
> 4 _________
> 5 __________
> 6 _______
Bugs for column(1) should go to:
E-MAIL: util-linux <at> vger.kernel.org
Web: https://github.com/util-linux/util-linux/issues
cheers,
Pádraig
This bug report was last modified 336 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.