3
I want to count the total outputs of the results in the terminal.
For example using the cat lista_de_compras.txt
:
arroz
feijão
leite
I want to receive 3
3
I want to count the total outputs of the results in the terminal.
For example using the cat lista_de_compras.txt
:
arroz
feijão
leite
I want to receive 3
7
Use the grep:
grep -c ^ lista_de_compras.txt
The exit will be 3
or user the cat with the wc
cat lista_de_compras.txt |wc -l
The exit will be 3
Or just use the wc
:
wc -l lista_de_compras.txt
The exit will be 3
Browser other questions tagged linux bash terminal
You are not signed in. Login or sign up in order to post.
thanks, it helped a lot
– DEV Tiago França