Journal pyros's Journal: AWT
ok. so I can do `netstat -lntp` as root on linux to see all TCP ports in the LISTEN state and the process that owns them. I thought it'd be cool to write w script to just get the PID of the process owning a particular port. The netstat listing give the PID/process name (ie 23918/java). I think this confuses AWT. `netstat -lntp | grep : | awt -F ' ' {'print $7'}` prints nothing. Printing $1-$6 works fine, it's just $7 that doesn't print, and I think it's because of the /. (no pun intendeg there) So I though "what about SED instead of AWT?" Well truth is I don't know SED regexps well enough. I tried s/^.* (\d)+\/.*$/$1/ since I think that's what I'd do in perl. But I don't think it liked the parens. Anyhoo. Anyone care to help me out?
AWT More Login
AWT
Slashdot Top Deals