Vérifier le caractère séparateur de champs d’un fichier CSV : "," / ";" ?
$ wc -l files.csv
201 (1)
$ rg "(.*;){46}" file.csv | wc -l
201 (2)
$ rg "(.*;){47}" file.csv | wc -l
0 (3)
$ rg "(.*,){46}" file.csv | wc -l
0 (4)
1 | 201 lines in the file.csv |
2 | 201 lines with 46 ";" characters |
3 | 0 lines with 47 ";" characters |
4 | 0 lines with 46 "," characters |
So the character that separates fields in this CSV file is ";".