howto:compter_les_lignes_d_un_fichier
compter les lignes d'un fichier
Il y a
wc -l fichier
mais ça affiche aussi le nom du fichier. Tu peux utiliser cut pour récupérer le premier champ.
Sinon
sed -n '$=' fichier
ou encore
awk 'END {print NR}' fichier
ou encore
cat fic | wc -l
howto/compter_les_lignes_d_un_fichier.txt · Last modified: 2025/02/19 10:59 by 127.0.0.1