Basically, I have an END {print NR} statement in my awk script to count the number of records as I have concatenated multiple files. But instead of generating this total number of records to the same output data file. I want to put this in a separate control file using the same awk script.
How can this be done? Can I specify a separate output file for this END {print NR} statement for the same awk script?