What I want to do is print a command-help (viz. "ls --help") and grep the output for any specific word. Consider the following:
ls --help | grep 'F'
But what this does is just filter out the other useful help.
I am aware of -A, -B, -C options for grep, but I want a better solution.
This link gives the basic usage of the command, but I want to have something like:
grep -E --color 'pattern' <<<SOME COMMAND HERE>>>
grep -E --color 'pattern' <ls --help>
Is it possible to do? Basically, grep the
ls --help but also print the whole help doc.