-
-
Save magussiro/32363537c42fd0121d21c4028bd1e627 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