Tiên Hương
New member
How do I count the number of lines in a file?
Answer
Approach:
Answer
Approach:
- Create a variable to store the file path.
- Use wc –lines command to count the number of lines.
- Use wc –word command to count the number of words.
- Print the both number of lines and the number of words using the echo command.