column error if no trailing newline

Bug #1793350 reported by Patrick Gray on 2018-09-19
This bug affects 2 people
Affects Status Importance Assigned to Milestone
bsdmainutils (Ubuntu)

Bug Description

The utility ``column`` gives the error ``column: line too long``, and does not produce the correct output, when given an input without a trailing newline:

$ python3 -c "print('a\nb\nc')" | column
a b c
$ python3 -c "print('a\nb\nc', end='')" | column
column: line too long
a b

This seems to be a bug, as it is not the case on my Manjaro laptop, which uses the column utility from pacman's util-linux package:

$ python3 -c "print('a\nb\nc')" | column
a b c
$ python3 -c "print('a\nb\nc', end='')" | column
a b c
$ pacman -Qo column
/usr/bin/column is owned by util-linux 2.32.1-2

Building the util-linux on ubuntu similarly gives what would appear to be correct behaviour:

$ make column > /dev/null
$ python3 -c "print('a\nb\nc', end='')" | ./column
a b c

System / package information:

$ lsb_release -rd
Description: Ubuntu 18.04.1 LTS
Release: 18.04
$ apt-cache policy bsdmainutils
  Installed: 11.1.2ubuntu1
  Candidate: 11.1.2ubuntu1
  Version table:
 *** 11.1.2ubuntu1 500
        500 bionic/main amd64 Packages
        100 /var/lib/dpkg/status

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bsdmainutils (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers