代码改变世界

收集shell脚本技巧

2017-08-16 15:27 by BibleLs, 445 阅读, 0 推荐, 收藏,
摘要:0. shell 调试 复制代码代码如下: sh -x somefile.sh 在somefile.sh 文件里加上set+x set-x1. 用 && || 简化if else 复制代码代码如下: gzip -t a.tar.gzif [[ 0 == $? ]]; then echo "good 阅读全文