[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: |
Eric Blake |
Subject: |
bug#12115: Please add tip about using tac to reverse a file byte-by-byte |
Date: |
Thu, 02 Aug 2012 07:28:10 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 |
On 08/02/2012 07:18 AM, Andreas Schwab wrote:
>> For bash, one solution is:
>>
>> $ printf '\na\nb'|tac -rs '.\|'$(printf "\n")
>
> No, command substitution strips trailing newlines.
So don't make it trailing:
printf '\na\nb'|tac -rs "$(printf '\n\\|.')"
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- 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, 2012/08/02
- 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 <=
- 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