Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
このように配列を宣言すると
declare -a test
このように値をエコーできます
i=2 echo ${test[i]}
また
i="1+1" echo ${test[i]}
なぜ2番目のフォームが受け入れられるのですか? 複雑な答えが必要です ありがとう
参照man bash:
man bash
添え字は、数値に評価される算術式として扱われます。
十分に複雑ですか?