Count number of columns in CSV files and rename if less than 11 columns – unix.stackexchange.com

I need to count the number of columns in CSV files. If less than 11, rename the file appending the .bad suffix. I tried this but it's short of what I need: head -1 myfile.csv | sed 's/[^,]//g' | wc ...

from Hot Questions - Stack Exchange OnStackOverflow
via Blogspot

Share this

0 Comment to "Count number of columns in CSV files and rename if less than 11 columns – unix.stackexchange.com"