摘要: 编写脚本中 如果我们命令行传参个数超过10个,无法获取第九个以后的值 测试:(可以看到,从第10个传参开始,无法获取正确传参内容) [root@localhost ]# cat test.sh #!/bin/bash test1=$1test2=$2test3=$3test4=$4test5=$5t 阅读全文
posted @ 2022-11-02 17:29 -小-白- 阅读(75) 评论(0) 推荐(0) 编辑
摘要: ​ for循环:(每读取一行在字符串下面添加#号) [root@localhost ]# cat /etc/passwd|awk -F ':' '{print $3}'|tail -5 > test1.txt [root@localhost ]# cat test1.txt 989 72 70 38 阅读全文
posted @ 2022-11-02 17:28 -小-白- 阅读(1502) 评论(0) 推荐(0) 编辑