5.shell给变量设置默认值

如下

#!/usr/bin/env bash
echo ${DEBUG-123}

如果DEBUG变量不存在,则输出默认值为123

posted @ 2020-07-08 10:49  番茄土豆西红柿  阅读(404)  评论(0)    收藏  举报
TOP