摘要:
来源:http://linux.vbird.org/linux_basic/0320bash.php#variable_other_re测试与替换:變數設定方式str 沒有設定str 為空字串str 已設定非為空字串var=${str-expr}var=exprvar=var=$strvar=${str:-expr}var=exprvar=exprvar=$strvar=${str+expr}var=var=exprvar=exprvar=${str:+expr}var=var=var=exprvar=${str=expr}str=exprvar=exprstr 不變var=str 不變var 阅读全文