Sample Header Ad - 728x90

"wc -l" takes very long for my files, is there a faster alternative?

0 votes
3 answers
2141 views
I need help in writing script that outputs the number of lines in each of a number of large files. wc -l is taking a long time, so I'm looking to use awk command to display the last line number for all files that match abd*2020-09-21* * ls -l abd*2020-09-21* displays 22 long (big) files * I need to find the wc -l result of each file. * Currently im using
wc -l abd*2020-09-21.txt > CCNC_UNIX_COUNTS.txt
but this is very time consuming. I need help in improving it. I tried
sed -n '$='
Now I need this to work in loop for all files matchinv abd*2020-09-21.txt and output the results to a file CCNC_UNIX_COUNTS
Asked by Rekha Mallam (11 rep)
Sep 28, 2020, 02:59 PM
Last activity: Jul 4, 2023, 10:17 AM