Created
April 17, 2018 06:55
-
-
Save hiyosi/40478d624f406c91407b875653fe8816 to your computer and use it in GitHub Desktop.
This file contains 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 | |
a=( | |
'sudo echo ${foo}' | |
'sudo ls -l' | |
'ls -l | sudo echo ${foo}' | |
) | |
foo="hello" | |
for ((i = 0; i < ${#a[@]}; i++)) | |
do | |
echo $(eval echo ${a[$i]}) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment