how to find the 2nd field

java....4059... compsite 62u IPv4 170747 TCP *:9400 (LISTEN)
java...... 05... compsite 109u IPv4 171216 TCP *:9401 (LISTEN)

This is Joust formated like this
Please Repace "." with space" "

All are Right Justfied

Output :- 4058 and 05 so that i can kill this

Try this:

awk '{print $2}'  yourinputfile