[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "Variation" in Command Substitution Behaviour
From: |
Reuti |
Subject: |
Re: "Variation" in Command Substitution Behaviour |
Date: |
Tue, 28 Feb 2017 16:04:52 +0100 |
> Am 28.02.2017 um 14:21 schrieb Reuti <reuti@staff.uni-marburg.de>:
>
> Hi,
>
>> Am 28.02.2017 um 11:00 schrieb Andreas Schwab <schwab@linux-m68k.org>:
>>
>> On Feb 28 2017, Geoff Hull <gbhull@gmail.com> wrote:
>>
>>> If I "source" the attached file (i.e. ". test_aliases") in a bash session,
>>> then run the following:
>>>
>>> assemble_fam1
>>> assemble_fam2
>>> say_families
>>>
>>> I see the following output:
>>>
>>> Flintstones=wilma:bam-bam:fred
>>> Rubbles=barney
Using the syntax $() for both functions renders also the order above unusable
(here FSTONES will get reset by assemble_fam2 then). Like $() will revert an
unrelated variable to a former state.
There also seems to be difference between using run_aliases or issuing both
commands by hand.
Using `` for both functions looks like being safe though and covers all cases.
-- Reuti
signature.asc
Description: Message signed with OpenPGP using GPGMail