[Top][All Lists]
[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: |
Jim Meyering |
Subject: |
bug#12115: Please add tip about using tac to reverse a file byte-by-byte |
Date: |
Thu, 02 Aug 2012 14:07:39 +0200 |
Andreas Schwab wrote:
> Jim Meyering <address@hidden> writes:
>
>> Andreas Schwab wrote:
>>> Jim Meyering <address@hidden> 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$
- bug#12115: Please add tip about using tac to reverse a file byte-by-byte, Reuben Thomas, 2012/08/01
- bug#12115: Please add tip about using tac to reverse a file byte-by-byte, Eric Blake, 2012/08/01
- bug#12115: Please add tip about using tac to reverse a file byte-by-byte, Jim Meyering, 2012/08/02
- bug#12115: Please add tip about using tac to reverse a file byte-by-byte, Andreas Schwab, 2012/08/02
- bug#12115: Please add tip about using tac to reverse a file byte-by-byte, Jim Meyering, 2012/08/02
- bug#12115: Please add tip about using tac to reverse a file byte-by-byte, Andreas Schwab, 2012/08/02
- bug#12115: Please add tip about using tac to reverse a file byte-by-byte,
Jim Meyering <=
- bug#12115: Please add tip about using tac to reverse a file byte-by-byte, Voelker, Bernhard, 2012/08/02
- bug#12115: Please add tip about using tac to reverse a file byte-by-byte, Andreas Schwab, 2012/08/02
- bug#12115: Please add tip about using tac to reverse a file byte-by-byte, Eric Blake, 2012/08/02
- bug#12115: Please add tip about using tac to reverse a file byte-by-byte, Andreas Schwab, 2012/08/02
- bug#12115: Please add tip about using tac to reverse a file byte-by-byte, Reuben Thomas, 2012/08/02