BASH_VERSINFO A readonly array variable

commandline session

$ 4.2.36 2 501---> echo BASH_VERSINFO[0]
BASH_VERSINFO[0]
$ 4.2.36 3 502---> echo $BASH_VERSINFO[0]
4[0]
$ 4.2.36 4 503---> echo $BASH_VERSINFO
4
$ 4.2.36 5 504---> echo $BASH_VERSINFO[1]
4[1]
$ 4.2.36 6 505---> echo BASH_VERSINFO[1]
BASH_VERSINFO[1]
$ 4.2.36 7 506---> echo "BASH_VERSINFO[1]"
BASH_VERSINFO[1]
$ 4.2.36 8 507---> echo BASH_VERSINFO(1)
bash: syntax error near unexpected token `('
$ 4.2.36 8 508---> echo BASH_VERSINFO[4]
BASH_VERSINFO[4]
$ 4.2.36 9 509---> echo $BASH_VERSINFO[4]
4[4]
$ 4.2.36 10 510---> echo ?BASH_VERSINFO[4]
?BASH_VERSINFO[4]
$ 4.2.36 11 511---> echo !BASH_VERSINFO[4]
bash: !BASH_VERSINFO[4]: event not found
$ 4.2.36 11 511---> echo ?BASH_VERSINFO[4]
?BASH_VERSINFO[4]
$ 4.2.36 12 512--->

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s