cmd calculer le nombres de lignes d'un fichier

Publié le par pti-jean

La commande "wc  -l" retourne le nombre de lignes d'un fichier:

ex:
$ wc -l .bash_history
500 .bash_history
ou:
$ cat .bash_history | wc -l
500

ex:
$ echo "un
> deux
> trois
> quatre
> cinq"
un
deux
trois
quatre
cinq
donc:
$ echo "un
> deux
> trois
> quatre
> cinq" | wc -l
5

Publié dans Commande Gnu-Linux

Pour être informé des derniers articles, inscrivez vous :
Commenter cet article