|
From: | Chet Ramey |
Subject: | Re: any plans for command substitution that preserves trailing newlines? |
Date: | Tue, 1 Jun 2021 09:28:53 -0400 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 |
On 5/31/21 9:34 PM, Christoph Anton Mitterer wrote:
Can someone (Chet?) confirm that the solution with adding *any* character and removing it later on works (i.e. with any locale and any valid variable content, which is, AFAIU, anything but NUL)?
If you want to append a byte and then be sure you can remove that byte later, make sure to set the locale to "C" before removing it. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
[Prev in Thread] | Current Thread | [Next in Thread] |