Jump to content

Bash (Unix shell): Difference between revisions

Line 57: Line 57:


If you want to save this into a variable, you can save it as an array:
If you want to save this into a variable, you can save it as an array:
<syntaxhighlight>
<syntaxhighlight lang="bash">
APPLES=({red,green,blue}_apple)
APPLES=({red,green,blue}_apple)
echo "${APPLES[@]}"
echo "${APPLES[@]}"
</syntaxhighlight>
</syntaxhighlight>