I need help in moving the contents printed by awk to a text file. THis is a continuation of previous quesion I have to move all the contents into the same file so it is appending.
To be specific
nawk -v file="$FILE" 'BEGIN{RS=";"}
/select/{ gsub(/.*select/,"select");gsub(/\n+/,"");print file,$0;}
/update/{ gsub(/.*update/,"update");gsub(/\n+/,"");print file,$0;}
/insert/{ gsub(/.*insert/,"insert");gsub(/\n+/,"");print file,$0;}
' "$FILE"
How to get the print results to a text file appended one after the other in the same file?