When running
grep 'string' *
I'm getting the following messages:
grep: some-directory: Is a directory
grep: other-directory: Is a directory
How to suppress those messages?
When running
grep 'string' *
I'm getting the following messages:
grep: some-directory: Is a directory
grep: other-directory: Is a directory
How to suppress those messages?
-s, --no-messages: Suppress error messages about nonexistent or unreadable files.
grep -s 'string' *
I.e. grep 'string' * 2> /dev/null
There are at least two ways to suppress error messages ("Is a directory
"):
grep -s 'string' *
grep 'string' * 2> /dev/null