Using grep for multiple search patterns
grep -e ‘attrib1’ -e ‘attrib3’ file From the man page : -e PATTERN, –regexp=PATTERN Use PATTERN as the pattern. This can be used to specify multiple search patterns, or to protect a pattern beginning with a hyphen (-). (-e is specified by POSIX.) Edit : Alternatively , you can save patterns in a file and … Read more