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

Liste des GroupesRevenir à cu shell 
Sujet : Re: What does @{FOOBAR@a} mean? (bash)
De : jpstewart (at) *nospam* personalprojects.net (John-Paul Stewart)
Groupes : comp.unix.shell
Date : 13. Apr 2024, 21:54:42
Autres entêtes
Message-ID : <l809oiF532iU1@mid.individual.net>
References : 1
User-Agent : Mozilla Thunderbird
On 2024-04-13 4:35 p.m., Kenny McCormack wrote:
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.

Search the man page for 'Parameter transformation' and you'll find it.
It's the last entry in the 'Parameter Expansion' section, just before
'Command Substitution' if that makes it any easier to find.


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