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.
bash スクリプトのすべての引数を配列に保存し、個別に出力するにはどうすればよいですか?
配列を初期化します。
ARGS=("$@") # "$@" gives the arguments passed to the script ARGS=(arg1 arg2 arg3) # or fill the array out yourself
配列項目を表示します。
for ARG in "${ARGS[@]}"; do printf '%s\n' "$ARG" done