Hi,
I want find multiple string in one file using find coomand.
And keeping it in one variable.grep is not working.
$ variable=`egrep "string1|string2|string3" infile`
grep -e 'string1|string2' file
put multiple pattern in one file ( a.txt)
and use fgrep
Probably you are talking about grep -f
?
fgrep
is equivalent to grep -F
. However both can be used together.
Sorry if you were trying to say something else which I misunderstood.
yes, i am talking about the
fgrep
which is
grep -F
because vivek wants to search for multiple string