bug#23922: cut fails for non-delimited input lines with -f 2
From:
Jens Mueller
Subject:
bug#23922: cut fails for non-delimited input lines with -f 2
Date:
Sat, 9 Jul 2016 01:05:22 +0200
User-agent:
Mutt/1.6.0 (2016-04-01)
Hi,
I'd like to report the following behavior of cut.
I execute
$ echo "abc" | cut -f 2 -d " "
and I expect the empty line as output but you get "abc\n".
I believe the empty line is correct because I selected the second
field which is empty.
If you select the 3rd field
$ echo "abc cde" | cut -f 3 -d " "
it outputs the empty line and works as expected which supports my
reasoning.
I am running Debian with
$ cut --version | head -1
cut (GNU coreutils) 8.25
Jens