I'm using Mac OS X v10.9.1 (Mavericks). Occasionally in my terminal, I will run grep commands like:
grep -i -s 'mystring' *
Is there a way I can make the "-s" (--no-messages) option the default whenever I run grep?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityI'm using Mac OS X v10.9.1 (Mavericks). Occasionally in my terminal, I will run grep commands like:
grep -i -s 'mystring' *
Is there a way I can make the "-s" (--no-messages) option the default whenever I run grep?
You can set up an alias to replace grep
with grep -s
. This would be in somewhere like ~/.bashrc in the form alias grep='grep -s'
.