[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "Variation" in Command Substitution Behaviour
From: |
Andreas Schwab |
Subject: |
Re: "Variation" in Command Substitution Behaviour |
Date: |
Tue, 28 Feb 2017 11:00:53 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
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
It seems like the shell is eating an extra newline. Try typing an empty
line after assemble_fam2:
$ set -x
$ assemble_fam1
+ fred
++ echo fred
+ FSTONES=fred
+ FSTONES=wilma:bam-bam:fred
$ assemble_fam2
+ barney
++ echo barney
+ RUBBLES=barney
$
+ RUBBLES=betty:pebbles:barney
$ say_families
+ say_families
+ echo Flintstones=wilma:bam-bam:fred
Flintstones=wilma:bam-bam:fred
+ echo Rubbles=betty:pebbles:barney
Rubbles=betty:pebbles:barney
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."