Help in outputting the result in log files

Yes, got the essence after reading the PDF "regarding redirection & print with no arguments", thanks a lot radoulov. You're awesome :slight_smile:

For the sake of clarity for the other users, I am posting the excerpt taken from the PDF that cleared my doubts (note: I just edited a bit)

The simple statement 'print' with no items is equivalent to 'print $0', it prints the entire current record. When '>' type of redirection is used in print eg: print val > file, the output file is erased before the first output is written to it. Subsequent writes to the same output file do not erase the file, but append to it. This is different from how you use redirections in shell scripts.

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

You're welcome!

:cool: Thanks a lot to all.You people really helped me a lot.
My special thanks to radoulov..