Quote:
awk 'END{print NR}' yourfile
Out of interest, I tried this on a 5 million record text file and the result came out as an exponential number. The result from "wc -l" was correct.
Anybody know how to get awk to count a large number of records?
@rajesh_2383
How many records in a typical file?
Are they fixed length records? If so, we could calculate the number of records from the file size.
What database engine is this? It may be quicker to write a count program in a high level language.