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

From: Eric Blake <[email-masked]>
Date: Thu, 02 Aug 2012 07:28:10 -0600

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   [email-masked]    +1-919-301-3266
Libvirt virtualization library http://libvirt.org