password(){
    if ! ${password+:} false
    then
        printf "password: "
        read -s password
    fi
}
[Shell Scriptを書くときのテクニック10選 κeenのHappy Hacκing Blog](http://keens.github.io/blog/2015/06/17/shell_scriptwokakutokinikiwotsuketaikoto/)