[Bug 1310414] [NEW] cut does not separate any fields if "newline" is set as the delimiter for -d
Captain Obvious
1310414 at bugs.launchpad.net
Sun Apr 20 23:28:46 UTC 2014
Public bug reported:
$ lsb_release -rd
Description: Ubuntu 14.04 LTS
Release: 14.04
$ apt-cache policy coreutils
coreutils:
Installed: 8.21-1ubuntu5
Candidate: 8.21-1ubuntu5
Version table:
*** 8.21-1ubuntu5 0
500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
100 /var/lib/dpkg/status
The cut utility is no longer separating fields if newline is used for the delimiter. I grabbed cut from my precise installation backup and put it in my home directory to compare it to the current one in /usr/bin. I have an example set up:
$ echo -e "monkey 1\nmonkey 2\nmonkey 3"
monkey 1
monkey 2
monkey 3
This is cut run with precise's version:
$ echo -e "monkey 1\nmonkey 2\nmonkey 3" | ./cut -f 1 -d'
> '
monkey 1
or, if you're snazzy like me, you use:
$ echo -e "monkey 1\nmonkey 2\nmonkey 3" | ./cut -f 1 -d$'\n'
monkey 1
That's what I expected to happen with this version. Instead, I got this:
$ echo -e "monkey 1\nmonkey 2\nmonkey 3" | /usr/bin/cut -f 1 -d$'\n'
monkey 1
monkey 2
monkey 3
$ echo -e "monkey 1\nmonkey 2\nmonkey 3" | /usr/bin/cut -f 1 -d'
> '
monkey 1
monkey 2
monkey 3
** Affects: coreutils (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to coreutils in Ubuntu.
https://bugs.launchpad.net/bugs/1310414
Title:
cut does not separate any fields if "newline" is set as the delimiter
for -d
Status in “coreutils” package in Ubuntu:
New
Bug description:
$ lsb_release -rd
Description: Ubuntu 14.04 LTS
Release: 14.04
$ apt-cache policy coreutils
coreutils:
Installed: 8.21-1ubuntu5
Candidate: 8.21-1ubuntu5
Version table:
*** 8.21-1ubuntu5 0
500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
100 /var/lib/dpkg/status
The cut utility is no longer separating fields if newline is used for the delimiter. I grabbed cut from my precise installation backup and put it in my home directory to compare it to the current one in /usr/bin. I have an example set up:
$ echo -e "monkey 1\nmonkey 2\nmonkey 3"
monkey 1
monkey 2
monkey 3
This is cut run with precise's version:
$ echo -e "monkey 1\nmonkey 2\nmonkey 3" | ./cut -f 1 -d'
> '
monkey 1
or, if you're snazzy like me, you use:
$ echo -e "monkey 1\nmonkey 2\nmonkey 3" | ./cut -f 1 -d$'\n'
monkey 1
That's what I expected to happen with this version. Instead, I got this:
$ echo -e "monkey 1\nmonkey 2\nmonkey 3" | /usr/bin/cut -f 1 -d$'\n'
monkey 1
monkey 2
monkey 3
$ echo -e "monkey 1\nmonkey 2\nmonkey 3" | /usr/bin/cut -f 1 -d'
> '
monkey 1
monkey 2
monkey 3
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/1310414/+subscriptions
More information about the foundations-bugs
mailing list