bash question
Does anyone know what the difference between the following is?
TEST="this test" echo $TEST response: this test echo ${TEST} resopnse: this test so I was wondering what the {} in the second echo statement does different then the first one Thanks |
the { } is used for what is called "brace expansion". To get an idea what it does, do these:
echo {a,z} echo {a..z} In your example, the braces do nothing. |
that does not work for variables
i think it is used for an array like ${TEST[2]} which would out put the 3rd entry in the array thanks |
Copy & paste that (including the empty line) into
an xterm or similar :} Code:
man bash Cheers, Tink |
All times are GMT -5. The time now is 05:44 PM. |