| |
| |
| |
|
Comments:
<0> why <0> sorry I seem to have missed your joke <1> sticky off <1> command sticky off
<1> command stick off <1> command /window stick off <1> command /window stick ofuh <2> anyone need a script? <2> anyone nedd a script <3> tag: oh, first guy to sail the world single-handed: http://www.joshuaslocumsocietyintl.org/ <3> tag: just wondering will you be doing same? :) <4> doubt <5> I'm using 'next' in such a way to avoid printing the second or nth match in a line and move on to the next line but it looks like awk keeps on processing the same line. what am I doing wrong? <5> by match I meant the field that I'm grabbing using the fiel separator <0> paul: I think so <3> tag: :) <3> tag: 'next' is supposed to do what you think it does, really. <3> example? <5> paul, for port in `netstat -anlt | awk -F':' '{print $1; next}'`; do /sbin/fuser $port/tcp;done <5> awk is apparently pointing to gawk
<3> tkup: print everything to the first : <3> the 'next' is superflous there really. <5> I see <3> you want to remove everything up to the last : in the fourth field, then print that fourth field really.. <3> e.g.: awk '{ sub(/.*:/, "", $4); print $4;}' <3> and you can run fuser from within gawk if you wish <3> netstat -anlt | awk 'BEGIN { fusercmd="/sbin/fuser";} { sub(/.*:/, "", $4); if ($4 ~ /^[0-9]/) { cmd=fusercmd " " $4 "/tcp"; system(cmd); close(cmd); } }' <5> paul, enough time to digest what you wrote there :) it makes sense now. thanks! <3> welcome <6> i need an awk one-liner to discard all lines in a text file under a certain length (80)... <7> awk 'length > 79' <6> goldfish, thanks! <0> goldfish++ <0> awkbot: karma goldfish <8> Karma for goldfish: 1 points <7> hehe <7> :)
Return to
#awk or Go to some related
logs:
getpass_asterisks gentoo admin #debian h2ctypes fedora rssh srpm #centos Fatal error: mysql.user table is damaged or in unsupported 3.20 format #debian ddcxinfo-knoppix dell laptop #linux #asm
|
|