linux shell 单独获取端口号

df=$(netstat -nlpt4  | awk '{print $4}' | cut -f2 -d:)

echo df

posted @ 2021-07-15 19:14  linux-123  阅读(358)  评论(0)    收藏  举报