What does @{FOOBAR@a} mean? (bash)

Liste des GroupesRevenir à cu shell 
Sujet : What does @{FOOBAR@a} mean? (bash)
De : gazelle (at) *nospam* shell.xmission.com (Kenny McCormack)
Groupes : comp.unix.shell
Date : 13. Apr 2024, 21:35:27
Autres entêtes
Organisation : The official candy of the new Millennium
Message-ID : <uveqaf$3obat$1@news.xmission.com>
User-Agent : trn 4.0-test77 (Sep 1, 2010)
Observe:

$ unset FOOBAR
$ echo ${FOOBAR@a}

$ FOOBAR=
$ echo ${FOOBAR@a}

$ export FOOBAR
$ echo ${FOOBAR@a}
x
$

It seems that it prints "x" iff the variable has been exported.
This works with any variable - the output is always "x" (iff it is exported).

I can find no mention of this feature in "man bash".  Note: I am not saying
it isn't in there - just that I couldn't find it.

Note that any other letter (such as "b") generates an error message if
FOOBAR is non-empty:

$ echo ${FOOBAR@b}

$ FOOBAR=Test
$ echo ${FOOBAR@b}
bash: ${FOOBAR@b}: bad substitution
$

What is going on?

--
No, I haven't, that's why I'm asking questions. If you won't help me,
why don't you just go find your lost manhood elsewhere.

CLC in a nutshell.

Date Sujet#  Auteur
13 Apr 24 * What does @{FOOBAR@a} mean? (bash)10Kenny McCormack
13 Apr 24 +- Re: What does @{FOOBAR@a} mean? (bash)1John-Paul Stewart
13 Apr 24 +* Re: What does @{FOOBAR@a} mean? (bash)2Helmut Waitzmann
13 Apr 24 i`- Re: What does @{FOOBAR@a} mean? (bash)1Kenny McCormack
14 Apr 24 `* Re: What does @{FOOBAR@a} mean? (bash)6Lew Pitcher
14 Apr 24  +* Re: What does @{FOOBAR@a} mean? (bash)3Kenny McCormack
14 Apr 24  i`* Re: What does @{FOOBAR@a} mean? (bash)2Kenny McCormack
14 Apr 24  i `- Re: What does @{FOOBAR@a} mean? (bash)1vallor
14 Apr 24  `* Re: What does @{FOOBAR@a} mean? (bash)2Popping Mad
14 Apr 24   `- Re: What does @{FOOBAR@a} mean? (bash)1Lew Pitcher

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal