bug#12115: Please add tip about using tac to reverse a file byte-by-byte
From:
Voelker, Bernhard
Subject:
bug#12115: Please add tip about using tac to reverse a file byte-by-byte
Date:
Thu, 2 Aug 2012 12:25:02 +0000
Jim Meyering wrote (Thursday, August 02, 2012 2:08 PM):
> You need the double quotes around $nl with bash,
> but not with zsh:
>
> zsh$ nl='
> quote> '
> zsh$ printf %s $nl
>
> zsh$
For bash, one solution is:
$ printf '\na\nb'|tac -rs '.\|'$(printf "\n")
b
a
$
;-)
Have a nice day,
Berny