Shell-script: search item in any order
I have got the following problem:
- every line in a textfile corresponds to a data record
- now i want to search for a certain data record with grep e.g.
so far so good.
But what, if I want to use several search items (and I don't no their order in the data record) at the same time to serach for a dedicated data record??
Quasi "grep PATTERN1&PATTERN2 /home/file" whereupon it doesn't matter in which order "PATTERN1" and "PATTERN2" occurs in "/home/file".
Has anybody an idea??