Parse port number from output