@eksperimental you're right, that will work but there are subtle differences between egrep
grep
and fgrep
which are perfectly explained in this Stackexchange answer (which I highly recommend going over) http://unix.stackexchange.com/a/17951
@serverhorror thank you for the feedback! Greatly appreciated.
I will edit the post to include a notice about exceeding the max command line arguments.
However, all your alternatives for do not satisfy the requirements:
- of getting the total number of matching files and not matches inside a given file, hence the use of
wc
(that provides other options as well) - of recursively looking for matches inside each file of a given parent directory and children
Why?
It might be a nice trick, but that's all it is.
Thanks for sharing, this is quite useful. I've been wondering for a while if an auto-completion solution existed :)
@apathetic Very true. I was looking into Vagrant and Chef a couple of days ago but didn't get the time to start implementing it in my projects. Thanks for the tip though :)
@psycotica0 Thank you for flagging the typo. It has been fixed. The
-i
option with blank extension forcessed
to edit the files themselves and not create other versions.