Skip to content

Instantly share code, notes, and snippets.

@yujintang
Created August 28, 2018 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yujintang/0fd5baa3f76fa51de5320dd32908219c to your computer and use it in GitHub Desktop.
Save yujintang/0fd5baa3f76fa51de5320dd32908219c to your computer and use it in GitHub Desktop.
#!/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