I'm not completely familiar with awk but at what point does it evaluade the > ? If it's evaluated each time the conditional applies, you'd wind up with two one-line files...
–
ShadurSep 22 '11 at 11:40

1

@Shadur > prints all output to the file, overwriting existing files. It isn't evaluated in such a way that it will result in any new lines overwriting old output from the same instance of awk. That is, if there are multiple matches, the file "match" will contain each match separated by OFS. The difference between > and >> exists in treatment of existing files.
–
Chris DownSep 22 '11 at 11:43