Wc -l


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Wc -l
# 1  
Old 11-30-2018
Wc -l

friends this command brings me the number of records but also brings the name as I can do that only gives me the number of records without the name of the file


Code:
example errror

865 salida_xygo.txt


example good
865

# 2  
Old 11-30-2018
wc -l < myFileName
This User Gave Thanks to vgersh99 For This Post:
# 3  
Old 11-30-2018
Some variants of wc have leading blanks.
Therefore, in portable script I prefer grep -c ^ myFileName
This User Gave Thanks to MadeInGermany For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question