]> git.ipfire.org Git - thirdparty/util-linux.git/commit
rev: stop adding new line at the end when input does not have it
authorSami Kerola <kerolasa@iki.fi>
Sun, 2 Jun 2013 17:51:16 +0000 (18:51 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 7 Jun 2013 10:24:46 +0000 (12:24 +0200)
commit7c7061f7713e47b435ce1924b225fb64d1ae56d5
tree790cc3dff7ea7aed2134d77d9c6e6a838e8e14ed
parente4b768c75c8870c8275abebd45e483e7a348e105
rev: stop adding new line at the end when input does not have it

When the rev(1) is executed twice outcome is expected to be exactly what
it was originally.  That includes not adding new line at the end of the
output.  The oneliner below demonstrates earlier issue.

$ printf "abc\n123" | rev | rev

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
tests/expected/misc/rev
tests/ts/misc/rev
text-utils/rev.c