Sujet : Re: Different variable assignments
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.unix.shellDate : 25. Oct 2024, 05:57:12
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vff8f9$31rsb$1@dont-email.me>
References : 1 2 3 4 5 6
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 24.10.2024 23:43, Frank Winkler wrote:
On 24.10.2024 13:21, Kenny McCormack wrote:
>I'm going to assume bash, but there isn't much difference. In
particular,
>note that $() is POSIX, so you really don't need to ever mess with ``.
I know that "$()" is POSIX but I don't feel "``" as a mess but in fact,
I like it much better. And we're talking about ksh.
[...]
I also know that the "``" thing should and does do it but I explicitly
asked why the "read" approach fails and that I'd prefer a solution with
the assignment at the end.
The posts have indicated that folks here were trying to clarify
what you [intended to] do. Kenny was suggesting some basic things
that you should indeed consider adapting to make your programs
clearer and less error-prone. Of course you can do what you like.
But you should really consider the "new" (i.e. 1988) syntax for
command substitution that Ksh had invented for documented reasons.
Janis
[...]