root@center1:~# lsof -i:9090
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 9206 root 61u IPv6 9483462 0t0 TCP *:9090 (LISTEN)
root@center1:~# lsof -i:9090|awk '{print $9}'`
> ;
> ^C
root@center1:~# lsof -i:9090|awk '{print $9}'
NAME
*:9090
我运行这个命令
lsof -i:9090|awk '{print $9}'`
出现
NAME
*:9090
但是我只想要name 下面的"*:9090"
请问如何处理呢?
接个管道然后 tail -1
lsof -i:9090|awk '{print $9}'|tail -1