How can I count all files without using find and only grep? I tried using ls recursively but how can I pipe that to grep and count files?
|
| ||||
|
feedback
|
|
To list all files that match a grep pattern:
To count them:
To count all non-empty files in a directory recursively, you search for an empty string (two single quotes):
| ||||
|
feedback
|
|
If you really want to use solely
| |||||||||||
feedback
|
*edit: | |||||||
feedback
|

find? Parsing thelsoutput is bad. – grawity Jan 17 at 12:40