bash4 以降は mapfile + プロセス置換を使う方法が標準的(?), スマートっぽい
# git remoteを配列 remotes に設定する mapfile -t remotes < <(git remote) echo "${remotes[@]}"
bash4 以降は mapfile + プロセス置換を使う方法が標準的(?), スマートっぽい
# git remoteを配列 remotes に設定する mapfile -t remotes < <(git remote) echo "${remotes[@]}"