Created
May 8, 2018 03:42
-
-
Save jaceju/93e077da93f22351e3e40a8c7ecbeed0 to your computer and use it in GitHub Desktop.
Shell Script 的陣列範例
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 | |
versions=("5.6.24" "7.0.9") | |
function say() | |
{ | |
value=$1 | |
echo -e "php-$value\n" | |
} | |
for name in ${versions[@]}; do | |
say $name | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment