This question already has an answer here:
- Run wc and display only the word count 2 answers
I want to output number of lines in text file.So I am using echo command but I am getting filename along with number of lines when I run the following code:
echo "$page" > t total="$(wc -l t)" echo "$total"
Output: 162 t
Note: Number of lines in file "t" are 162 only.