Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16355

Command substitution

Path csiph.com!goblin2!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail
From worley@alum.mit.edu (Dale R. Worley)
Newsgroups gnu.bash.bug
Subject Command substitution
Date Tue, 02 Jun 2020 21:44:45 -0400
Lines 23
Approved bug-bash@gnu.org
Message-ID <mailman.1029.1591148692.2541.bug-bash@gnu.org> (permalink)
References <87mu5kgbxu.fsf@hobgoblin.ariadne.com>
NNTP-Posting-Host lists.gnu.org
X-Trace usenet.stanford.edu 1591148692 2449 209.51.188.17 (3 Jun 2020 01:44:52 GMT)
X-Complaints-To action@cs.stanford.edu
To bug-bash@gnu.org
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcastmailservice.net; s=20180828_2048; t=1591148687; bh=Ty427rlz5MSIomnLKLUXoqYCptjhJ3VcRW5gWsTQA5Q=; h=Received:Received:Received:Received:From:To:Subject:Date: Message-ID; b=VDeQ20U8sgUHdOIyDH8fY8W5CF74HUxGraGTceDW2JesBS+BKvSCrFLhIEdm3bOy7 8hVnKOm5CDWtFECfXeBp+zzwkhOstsbtmz44yg2Y6Zicb7x/MznEfRn7YKKUN6LSmc MxnrRgRX4721Fy0uGPVZSOW8en/P5Oa9jXgMXntkxlq7Lw+B0MlhnQlNT45B5/M9A5 K07SkAVHffiaYOX0PVNNpa2IiXzkWewHuXAE9Za8u68F3bV+VmNNRW33d5rqUSoPBO Nc+2nzwZpi7EZktrKfGFMOxGCmfzkQGGBLdNzyraDld8im4naY/HIa9dBKokaD/PEm rjAkvSfODre9Q==
X-Xfinity-VMeta sc=0.00;st=legit
X-Authentication-Warning hobgoblin.ariadne.com: worley set sender to worley@alum.mit.edu using -f
Received-SPF permerror client-ip=2001:558:fe21:29:69:252:207:36; envelope-from=worley@alum.mit.edu; helo=resqmta-ch2-04v.sys.comcast.net
X-detected-operating-system by eggs.gnu.org: First seen = 2020/06/02 21:44:48
X-ACL-Warn Detected OS = ???
X-Spam_score_int -18
X-Spam_score -1.9
X-Spam_bar -
X-Spam_report (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, T_SPF_PERMERROR=0.01, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN
X-Spam_action no action
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <87mu5kgbxu.fsf@hobgoblin.ariadne.com>
Xref csiph.com gnu.bash.bug:16355

Show key headers only | View raw


Naively, I expect that

    FOO="$( command2 )"
    command1 $FOO

has the same effect as

    command1 $( command2 )

and

    FOO="$( command2 )"
    command1 "$FOO"

has the same effect as

    command1 "$( command2 )"

Has anyone pushed the boundaries of this and can tell me whether there
are gotchas?

Dale

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Command substitution worley@alum.mit.edu (Dale R. Worley) - 2020-06-02 21:44 -0400

csiph-web