forループで使用される変数を変数自体で構成できる場合は、リストも可能ですか?

forループで使用される変数を変数自体で構成できる場合は、リストも可能ですか?

作ろうスクリプトほぼもの得る以前にクリーンアップその中に変数に保存する必要があるブール値を残しました。最後のループで実行すると完了です。

私が言う内容の最後の部分は、次のように読みにくいバージョンです。

                         [↑continues on top↑]
var5="$(some long operation that has different results on different systems   )"
var6="$(bc of escaping or slighly different variations on the basic set of    )"
var7="$(UNIXy commands preloaded on every system's minimal installation       )"
var8="$(e.g: <grep> Um…what else…oh yeah!  The output of these is 1 or 0  

ベストアンサー1

番号付き変数の代わりに配列を使用します。

entries=(
    "$(some long operation that has different results on different systems   )"
    "$(bc of escaping or slighly different variations on the basic set of    )"
    "$(UNIXy commands preloaded on every system's minimal installation       )"
    "$(e.g: <grep> Um…what else…oh yeah!  The output of these is 1 or 0  

おすすめ記事