[ILUG] Silly gawk Q

Philip Reynolds phil at redbrick.dcu.ie
Tue Feb 13 17:17:00 GMT 2001


JustinMacCarthy's [macarthy at iol.ie] 13 lines of wisdom included:
:>I'm using gawk on a log file 
:>
:>gawk {FS = " "}; $9~/404/ {print $9 $11 } file 
:>
:>How do I get a space between the fields in the output ?

gawk {FS = " "}; $9~/404/ {print $9,$11 } file
gawk {FS = " "}; $9~/404/ {print $9 " " $11 } file
Phil.




More information about the ILUG mailing list