标签:style 练习 pre zhang exit declared variable shell脚本 class
######################################################################### # File Name: 9-6.sh # Author: zhang yunabo # mail: ma6174@163.com # Created Time: Tue 18 Sep 2018 05:48:32 PM EDT ######################################################################### #!/bin/bash username0= echo "username has declared,but is et to null" echo "username0 = ${username0-`whoami`}" echo echo username1 has not been declared echo "username1 = ${username1- `whoami`}" username2= echo "username2 has declared , but is set to null" echo "${username2:-`whoami`}" variable= echo "${variable-0}" echo "${variable:-0}" unset variable echo "${variable-2}" echo "${variable:-3}" exit 0
标签:style 练习 pre zhang exit declared variable shell脚本 class
原文地址:https://www.cnblogs.com/zhangyuanbo12358/p/9672118.html