I\'m trying to do a command which add to my file: Name of the current input file + Index of line where numbers of commas are less than 5 + numbers of commas across the line.
For strings, use %s format in printf:
%s
printf
awk -F"," '{ if(NF > 5) printf("Filename: %s Index: %d Number of commas : %d\n",FILENAME,NR, NF-1); }' dsc* >> filename.csv