摘要: 1.格式 case 值 in val1) #模式1 command ... ;; val2) #模式2 command ... ;; val3) #模式3 command ... ;; *) #如果没有匹配上面模式的话,匹配这个 command ... ;; esac 例子: echo "输入 1 阅读全文
posted @ 2020-06-16 22:37 人民广场的二道贩子 阅读(188) 评论(0) 推荐(0)
摘要: 1.结构 while condition do command done 例子: #!/bin/bash int=1 while (($int<=5)) do echo $int let "int++" done 2.无线循环的例子 while : do command done while tur 阅读全文
posted @ 2020-06-16 22:26 人民广场的二道贩子 阅读(129) 评论(0) 推荐(0)
摘要: 1.cat cat(conCATenate 拼接) (1).打印单个文件 cat file.txt (2).打印多个文件 cat file1.txt file2.txt (3).去掉多余的空白行 cat -s file (4).显示行号 cat -n file 2.find (1).根据文件名或正则 阅读全文
posted @ 2020-06-16 22:15 人民广场的二道贩子 阅读(170) 评论(0) 推荐(0)