shell提取当前sshd的端口号和进程id
root权限下使用:
netstat -tnp | grep sshd
输出:
tcp 0 0 192.201.0.8:22 192.201.0.90:4614 ESTABLISHED 3604/sshd: yang [pr
如何对该字串用sed处理,使输出结果为:
sshd Port&&pid: 22 5412
wakaka
10 years, 5 months ago
Answers
Hagu
answered 10 years, 5 months ago