Deutsch   English   Français   Italiano  
<vff8f9$31rsb$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Janis Papanagnou <janis_papanagnou+ng@hotmail.com>
Newsgroups: comp.unix.shell
Subject: Re: Different variable assignments
Date: Fri, 25 Oct 2024 06:57:12 +0200
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <vff8f9$31rsb$1@dont-email.me>
References: <lmt83dFsvbvU3@mid.individual.net>
 <lmvkisF860uU2@mid.individual.net> <ln7313Fc93dU1@mid.individual.net>
 <lnuidqFk4dU1@mid.individual.net> <vfdajn$3k665$1@news.xmission.com>
 <lnvtcvFk4dU2@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 25 Oct 2024 06:57:13 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="b076f93abfd6a512a74043549fa9a9df";
	logging-data="3207051"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19n17oXsG8+CemTZ9gmCw3l"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
 Thunderbird/45.8.0
Cancel-Lock: sha1:ahrBTVZAin9RF+nBHN+KVMtK4T8=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <lnvtcvFk4dU2@mid.individual.net>
Bytes: 2229

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

> [...]