Sujet : Re: What does @{FOOBAR@a} mean? (bash)
De : nn.throttle (at) *nospam* xoxy.net (Helmut Waitzmann)
Groupes : comp.unix.shellDate : 13. Apr 2024, 22:21:30
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <838r1harhh.fsf@helmutwaitzmann.news.arcor.de>
References : 1
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)
gazelle@shell.xmission.com (Kenny McCormack):
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). >
That's correct.
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. >
man -- 1 bash 2> /dev/null |
sed -E -e '/\$\{[[:alpha:]]+@/,$p' -n