bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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









reply via email to

[Prev in Thread] Current Thread [Next in Thread]