Skip to content

Instantly share code, notes, and snippets.

@horitaku1124
Created April 11, 2013 10:52
Show Gist options
  • Save horitaku1124/5362453 to your computer and use it in GitHub Desktop.
Save horitaku1124/5362453 to your computer and use it in GitHub Desktop.
コマンドを配列にして実行
#!/bin/bash
array=()
array+=(date)
array+=(ls)
array+=(pwd)
for e in ${array[@]}
do
echo ${e} | bash
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment