All Questions
2 questions
2
votes
1
answer
2k
views
POSIX and Portability | shell scripts | grep -s, grep -q
I am all in for portability in regards to shell scripts.
But I am unsure if I am overdoing it right now.
In this example, we have a function called confirmation, which accepts the very first ...
3
votes
4
answers
11k
views
Test if command accepts a specific option
What is the preferred way to test if a command takes an option? What are the caveats?
As a motivating example, at login my shell aliases grep to add several --exclude-dir options but this option is ...