I am just beginning to learn how to use Unix and its commands. Assuming my home directory is named LearnCS, I want to write out the command to count how many files I have in my home directory that end with the extension *.txt with the resultant answer being a single number.
I believe I need to use grep and piping, but I'm not exactly sure...somethin g like:
grep LearnCS *.txt | wc -l
Maybe? Any suggestions would be greatly appreciated!
I believe I need to use grep and piping, but I'm not exactly sure...somethin g like:
grep LearnCS *.txt | wc -l
Maybe? Any suggestions would be greatly appreciated!
Comment