Row count Shell Script
Dear All,
I need to write shell script which can take number of files and count total rows from all CSVs and display total number of rows counted in all files. Is there any possibility of doing that using shell script and if yes then how. Any help will greatly be appreciated. |
You can use `wc -l` to count the number of rows.
|
Try:
Code:
#!/bin/bash |
Quote:
Code:
cat *.csv | wc -l |
Quote:
don't do this Code:
for f in `ls *.CSV`; Code:
for f in *.CSV Code:
wc -l < file |
All times are GMT -5. The time now is 02:17 AM. |