Count number of headers in a CSV file using the shell/terminal/console
#/bin/sh # Count number of headers in all CSV files in the current directory for i in `ls`; do echo $i; head -1 $i | sed 's/,/ /g' | wc -w;done