Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 43 |
Nodes: | 6 (0 / 6) |
Uptime: | 108:24:56 |
Calls: | 290 |
Files: | 905 |
Messages: | 76,683 |
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.
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.
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.
Observe:[snip]
$ 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".
What is going on?
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.
On Sat, 13 Apr 2024 20:35:27 +0000, Kenny McCormack wrote:
Observe:[snip]
$ 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".
What is going on?
${parameter@operator}
I wonder what the "flag values" are that you get with @a (my "x")...
In article <uvf9ve$3oki0$1@news.xmission.com>, Kenny McCormack <gazelle@shell.xmission.com> wrote:
...
I wonder what the "flag values" are that you get with @a (my "x")...
I suppose "x" is for exported.
The expansion is a string consisting of flag values
representing parameter's attributes.
On 4/13/24 18:14, Lew Pitcher wrote:
The expansion is a string consisting of flag values
representing parameter's attributes.
What does this mean?