Created
April 11, 2013 11:58
-
-
Save horitaku1124/5362816 to your computer and use it in GitHub Desktop.
複数のコマンドを配列にして実行
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
list=() | |
list+=("date '+%Y/%m/%d %H:%M:%S'") | |
list+=("date '+%Y-%m-%d %H:%M:%S'") | |
list+=("date '+%Y-%m-%d'") | |
for((i = 0; i < ${#list[@]}; i++)) | |
do | |
echo ${list[$i]} | bash | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment