📝

Testing Traps

2329
0次下载
3次浏览
2026/3/9

- `[ $var = "x" ]` fails if var empty — quote: `[ "$var" = "x" ]` - `[[ ]]` doesn't word-split — `[[ $var = "x" ]]` works unquoted - `<` and `>` in `[ ]` are redirects — use `-lt`, `-gt` or escape - Pattern only in `[[ ]]` — `[[ $var == *.txt ]]` - Pattern must be unquoted — `"*.txt"` matches literal asterisk

广告位 300x250

资源信息

数据来源
bigquery-gharchive
分类
uncategorized
创建时间
2026/3/9
更新时间
2026/4/26

评论 (0)

登录后发表评论

加载中...