How can I use grep to search for line with either 'res' or 'rep'?
i try "grep -e res|rep" or gre -e "rep|rep" but that does not work.
You can also use -E option with grep, so there's no need to escape "|", for example:
grep -E 'res|rep' file
Or, you can use egrep, which is the same thing as grep -E:
egrep 'res|rep' file
You need to escape the pipe character:
grep 'res\|rep' file
or use multiple
grep -e 'res' -e 'rep' file
The regex sort of way is:
grep -nis "re[sp]" <FILENAME>
This way you will be presented with all lines containing either "res" or "rep"
also note that
-nis is in no way important here, I just like it that way... :)