opensubscriber
   Find in this group all groups
 
Unknown more information…

b : bug-coreutils@gnu.org 2 August 2012 • 8:07PM -0400

bug#12115: Please add tip about using tac to reverse a file byte-by-byte
by Jim Meyering

REPLY TO AUTHOR
 
REPLY TO GROUP




Andreas Schwab wrote:

> Jim Meyering <jim@meye...> writes:
>
>> Andreas Schwab wrote:
>>> Jim Meyering <jim@meye...> writes:
>>>
>>>> (note that below there's the added advantage of not having to
>>>> double-quote to include $nl and hence not having to double-backslash)
>>>
>>> You can have that with the variable as well.
>>
>> You're right.  We could write it like this:
>>
>>     printf '\na\nb'|tac -rs '.\|'$nl
>
> No, you need the quotes around $nl.

You need the double quotes around $nl with bash,
but not with zsh:

    zsh$ nl='
    quote> '
    zsh$ printf %s $nl

    zsh$




Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.