Created
August 28, 2018 16:43
-
-
Save yujintang/0fd5baa3f76fa51de5320dd32908219c 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 | |
base=(a b c) | |
symbols=($(echo "$base")) | |
function checkarg { | |
if [ $# -gt 0 ]; then | |
symbols=($(echo "$@")) | |
else | |
symbols=($(echo "$base")) | |
fi | |
} | |
start(){ | |
checkarg $@ | |
for symbol in ${symbols} | |
do | |
echo $symbol | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment