I am using wc -l
to count the number of lines I get as output from docker ps
command. Sometimes there are no containers in the list and it just gives empty line but wc -l
counts that as well and says the answer as 1. How can I avoid this
Asked
Active
Viewed 1,001 times
0

ambikanair
- 4,004
- 11
- 43
- 83