随笔分类 - shell
摘要:web 服务的探测。 #!/bin/bash port=`netstat -lnp | grep 80` if [ -z "port" ]; then echo "not start service."; exit; fi web_server=`echo $port | awk -F'/' '{p
阅读全文
摘要:Shell 数组:关联数组使用 declare 命令来声明,语法格式如下:declare -A site site["google"]="www.google.com"site["runoob"]="www.runoob.com"site["taobao"]="www.taobao.com" ech
阅读全文
摘要:#!/bin/bash#从A 1文件的数据 到B2文件对比 匹配到就输出B2文件所在行内容for line in `cat list.txt`do if [ `grep $line all.txt|wc -l` = 1 ] then grep $line all.txt fidone
阅读全文

浙公网安备 33010602011771号