![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Shell
calk2008
这个作者很懒,什么都没留下…
展开
-
测试脚本被调用的参数是否正确
E_WRONG_ARGS=65 script_parameters="-a -h -m -z" # -a = all, -h = help, 等等. if [ $# -ne $Number_of_expected_args ] then echo "Usage: `basename $0` $script_parameters" # `basena原创 2016-05-18 08:08:49 · 252 阅读 · 0 评论 -
shell sed命令
#!/bin/bash para1=$1; para2=$2; sed "s/${para1}/${para2}/" hello.txt; #注意这里的双引号,实验的时候单引号不能搞定原创 2016-05-18 21:54:58 · 191 阅读 · 0 评论