Secret method using fgrep (i.e. fixed strings) that works on Solaris 10 ...
Provide a list of templates, each of which is separated by NEWLINE, but is displayed in such a way as to interpret the shell as one word: -
fgrep 'pattern1 pattern2' filename
This method also works for grep , fgrep and egrep in /usr/xpg4/bin , although ERE in any of the channel-limited /usr/xpg4/bin is sometimes the least fussy.
You can insert arbitrary strings into a string if your shell allows you to edit history, for example: in bash the Cv Cj problem is in emacs mode or in vi mode.
source share