I want to use find command to find some string in files, and want to see the find result and the number of match line at the same time.
For example, use following command, I can get the find result, but I cannot know how many match result I have got.
find . -name .history | xargs grep ls
the output is
ls -r
ls -R
ls
what I expect output is like this
ls -r
ls -R
ls
total match number: 3
How can I get my expect output?