A shell colon does nothing. Use it anyway
空冒号在 shell 中不起作用,但还是使用它
HN 125 分 · 42 条评论 · 作者 olexsmir · 来源 refp.se · HN 讨论
【摘要】
The article highlights the power of the shell colon in streamlining script logic, specifically replacing multiple lines of argument validation with a single construct. This technique utilizes parameter expansion to check if variables are set or empty, exiting with an error if they are not.
⋯ 继续阅读请登录会员 ⋯