|
From: | Chet Ramey |
Subject: | Re: ${var@A}; hypothetical, related parameter transformations |
Date: | Thu, 21 Mar 2024 16:12:42 -0400 |
User-agent: | Mozilla Thunderbird |
On 3/20/24 4:30 PM, Zachary Santer wrote:
The point I'm trying to make is that ${var@A} expanding to either a declare command, an assignment statement, or nothing, depending on potentially changing criteria, is unnecessarily cumbersome. In whatever circumstances where a bash programmer would actually want a declare statement as the expansion of ${var@A}, it doesn't suit their purposes for that expansion to not give them that under certain conditions.
If you want to be guaranteed a declare command for a particular name, use `declare -p'. Parse the result of a (nofork) command substitution if you must. -- ``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/
OpenPGP_signature.asc
Description: OpenPGP digital signature
[Prev in Thread] | Current Thread | [Next in Thread] |