Below is Output of command:
netstat -plten|grep 45678
tcp 0 0 :::45678 :::* LISTEN 0 129367622 109746/java
However, I want to get ‘109746’ as output.
I tried:
netstat -plten|grep 45678|awk ' {print$9}'
But this one gives 109746/java
as an output; is there any way, I can use $9
to match with some regex such that I get desired output.