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