]> git.ipfire.org Git - thirdparty/coreutils.git/commit
cat: extend --show-ends to show \r\n as ^M$
authorPádraig Brady <P@draigBrady.com>
Tue, 9 Feb 2021 23:01:34 +0000 (23:01 +0000)
committerPádraig Brady <P@draigBrady.com>
Wed, 10 Feb 2021 14:17:26 +0000 (14:17 +0000)
commit2de30c7350a77b091afa1eb284acdf082c0f6aa5
tree7c6564046a0dad9cfa7e3d0b2353968338250f89
parent735083ba24878075235007b4417982ad5700436d
cat: extend --show-ends to show \r\n as ^M$

  - \r\n is common a line end combination
  - catting such a file without options causes it to display normally
  - overwriting the first char with $, loses info

* src/cat.c (cat): Convert \r preceeding a \n to ^M.
* tests/misc/cat-E.sh: New test.
* tests/local.mk: Reference new test.
* tests/misc/cat-proc.sh: Fix typo.
* doc/coreutils.texi (cat invocation): Mention the new behavior.
* NEWS: Mention the improvement.
NEWS
doc/coreutils.texi
src/cat.c
tests/local.mk
tests/misc/cat-E.sh [new file with mode: 0755]
tests/misc/cat-proc.sh