connmap icon indicating copy to clipboard operation
connmap copied to clipboard

Simplify the pipe command to read IP addresses

Open zvr opened this issue 5 months ago • 0 comments

The awk command already includes the functionality of grep and cut, so there is no need to have four processes when two are enough...

Feel free to try:

ss -atun4  | awk '$2=="ESTAB" {split($6,a,":"); print a[1]}'

Signed-off-by: Alexios Zavras (zvr) [email protected]

zvr avatar Jul 25 '25 23:07 zvr