AWK Help- Writing Data into a File

Hi All,

I need to maintain a AUDIT file in system for every incoming and outgoing file. For this i am trying to append a record by using the AWK every time the file arriving.
I have used the code as below.
AWK '{print "FILENAME IS", $1,"DATE IS", $2}' >> AUDITFILE.txt

$1 and $2 are global variables from the previous line of code.

The above one is waiting for some more input and i dont now how to close the command.

At the end AUDITFILE is creating with no records.

Can any one help me how to append the data into a file by using the AWK?

Thanks,
Raam.

You can use echo instead of awk
echo "FILENAME IS $1 DATE IS $2" >> AUDITFILE.txt

Usage of awk is either on the output of a command like
echo FIRST SECOND|awk '{print $1 $2}'

Or on a file like

awk '{print $1 $2}' filename