7、远程获取数据

 

#!/bin/bash

ip=192.168.247.173
shl=`netstat -lnt | awk 'NR>2{print $4}'| sed 's/.*://' | sort -n | uniq`

cat >> ipport <<EOF
$ip
${shl}
EOF

posted @ 2021-03-08 11:27  WH·xiao  阅读(81)  评论(0编辑  收藏  举报