Created
February 27, 2016 02:25
-
-
Save ishiy1993/0fdf93d081bd731ee5a3 to your computer and use it in GitHub Desktop.
bashの変数展開の活用。変数が空の場合の処理。
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 | |
arg1=${1:?Need arguments} | |
arg2=${2:-!!!} | |
echo Hello ${arg1}${arg2} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment