summaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2014-05-30 17:44:32 +0100
committerPádraig Brady <P@draigBrady.com>2014-06-01 12:14:39 +0100
commit5c6cf94ba5f6c05b3ab6e732de7202754558c03c (patch)
treec042e76c151a9ee32b26ae88ce68637bb48c9c03 /NEWS
parent39d1c9576a3f2e5e65c5fb06744aa7245d743bc0 (diff)
downloadcoreutils-5c6cf94ba5f6c05b3ab6e732de7202754558c03c.tar.xz
cut: restore special case handling of -f with -d$'\n'
commits v8.20-98-g51ce0bf and v8.20-99-gd302aed changed cut(1) to process each line independently and thus promptly output each line without buffering. As part of those changes we removed the special handling of --delimiter=$'\n' --fields=... which could be used to select arbitrary (ranges of) lines, so as to simplify and optimize the implementation while also matching the behavior of different cut(1) implementations. However that GNU behavior was in place for a long time, and could be useful in certain cases like making a separated list like `seq 10 | cut -f1- -d$'\n' --output-delimiter=,` although other tools like head(1) and paste(1) are more suited to this operation. This patch reinstates that functionality but restricts the "line behind" buffering behavior to only the -d$'\n' case. We also fix the following related edge case to be more consistent: before> printf "\n" | cut -s -d$'\n' -f1- | wc -l 2 before> printf "\n" | cut -d$'\n' -f1- | wc -l 1 after > printf "\n" | cut -s -d$'\n' -f1- | wc -l 1 after > printf "\n" | cut -d$'\n' -f1- | wc -l 1 * src/cut.c (cut_fields): Adjust as discussed above. * tests/misc/cut.pl: Likewise. * NEWS: Mention the change in behavior both for v8.21 and this effective revert. * cfg.mk (old_NEWS_hash): Adjust for originally omitted v8.21 entry. * src/paste.c: s/delimeter/delimiter/ comment typo fix.
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS7
1 files changed, 7 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 3919b7245..fa1aab8d5 100644
--- a/NEWS
+++ b/NEWS
@@ -90,6 +90,10 @@ GNU coreutils NEWS -*- outline -*-
chroot --userspec will now unset supplemental groups associated with root,
and instead use the supplemental groups of the specified user.
+ cut -d$'\n' again outputs lines identified in the --fields list, having
+ not done so in v8.21 and v8.22. Note using this non portable functionality
+ will result in the delayed output of lines.
+
ls with none of LS_COLORS or COLORTERM environment variables set,
will now honor an empty or unknown TERM environment variable,
and not output colors even with --colors=always.
@@ -343,6 +347,9 @@ GNU coreutils NEWS -*- outline -*-
the system by skipping duplicate entries (identified by the device number).
Consequently, df also elides the early-boot pseudo file system type "rootfs".
+ cut -d$'\n' no longer outputs lines identified in the --fields list,
+ to align with other implementations and to avoid delayed output of lines.
+
nl no longer supports the --page-increment option, which has been
deprecated since coreutils-7.5. Use --line-increment instead.