Unix- Using Grep to get unmatched lines -
i new unix. want grep unmatched pattern file1 provided patterns in file2. real files having more 1000 lines.
example:
file1: hi(everyone) how(u)people(are)doing? thanksinadvance file2: hi(every thanksi
required result:
how(u)people(are)doing?
i want pattern used ("hi(every") grep.it should return unmatched line file1.
this line works given example:
grep -fvf file2 file1
the 3 options used above:
-f makes grep fixed-string match -v invert matching -f patterns file
Comments
Post a Comment