[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: any plans for command substitution that preserves trailing newlines?
From: |
Chet Ramey |
Subject: |
Re: any plans for command substitution that preserves trailing newlines? |
Date: |
Wed, 26 Jan 2022 14:53:49 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 |
On 1/26/22 12:25 PM, Christoph Anton Mitterer wrote:
> Back to old state,... none of the other vars were changed.
>
> So if I just touch LC_ALL, why do I "have to make sure you save and
> restore **all** the locale variables"?
I suppose you can get away without doing it, as long as you pay attention
to which of those variables are exported (and so affect other processes'
locale state) and which are not and affect only the shell, and make sure
that the internal and external state is consistent before and after you
do your thing. Bash will reset the state properly for you, but you don't
know what other implementations will do.
--
``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/
- Re: any plans for command substitution that preserves trailing newlines?, Christoph Anton Mitterer, 2022/01/25
- Re: any plans for command substitution that preserves trailing newlines?, Christoph Anton Mitterer, 2022/01/25
- Re: any plans for command substitution that preserves trailing newlines?, Chet Ramey, 2022/01/26
- Re: any plans for command substitution that preserves trailing newlines?, Christoph Anton Mitterer, 2022/01/26
- Re: any plans for command substitution that preserves trailing newlines?, Alex fxmbsw7 Ratchev, 2022/01/26
- Re: any plans for command substitution that preserves trailing newlines?, Alex fxmbsw7 Ratchev, 2022/01/26
- Re: any plans for command substitution that preserves trailing newlines?,
Chet Ramey <=
- Re: any plans for command substitution that preserves trailing newlines?, Christoph Anton Mitterer, 2022/01/26
- Re: any plans for command substitution that preserves trailing newlines?, Chet Ramey, 2022/01/26
- Re: any plans for command substitution that preserves trailing newlines?, Christoph Anton Mitterer, 2022/01/26
- Re: any plans for command substitution that preserves trailing newlines?, Chet Ramey, 2022/01/26
- Re: any plans for command substitution that preserves trailing newlines?, Christoph Anton Mitterer, 2022/01/26
- Re: any plans for command substitution that preserves trailing newlines?, Chet Ramey, 2022/01/27
- Re: any plans for command substitution that preserves trailing newlines?, Christoph Anton Mitterer, 2022/01/27
- Re: any plans for command substitution that preserves trailing newlines?, Chet Ramey, 2022/01/28
- Re: any plans for command substitution that preserves trailing newlines?, Christoph Anton Mitterer, 2022/01/28
- Re: any plans for command substitution that preserves trailing newlines?, Chet Ramey, 2022/01/29