hello everyone, can You explain please, can grep
pick rows if at least one element from the list appeared, for exmaple
grep "hello world" file1
grep must give me all rows which have or word hello or world or both of them
, thanks in advance
hello everyone, can You explain please, can grep
pick rows if at least one element from the list appeared, for exmaple
grep "hello world" file1
grep must give me all rows which have or word hello or world or both of them
, thanks in advance
how about
grep -r "hello\|world" file1
that's a recursive grep by the way. it searches recursively for the term "hello world" in file1. it can also apply to a directory like so:
grep -r "hello\|world" dir/dir2/
put your patterns in some file patterns.txt, one pattern per line, and run
grep -Ff patterns.txt file1