When I enter in a series of strings in a pattern file to be used by grep -f, is there any way to specify that it return the results in the order specified in the pattern file rather than as it finds them?
I.E. I have the pattern file that contains something like the following:
backup7
backup2
backup4
backup13
backup1
...
And the grep -f returns the following:
backup13
backup4
backup7
backup1
...
How can I make it read the file and grep for the results in the order specified in the pattern file?
Any help would be greatly appreciated.
Thanks,
John
I.E. I have the pattern file that contains something like the following:
backup7
backup2
backup4
backup13
backup1
...
And the grep -f returns the following:
backup13
backup4
backup7
backup1
...
How can I make it read the file and grep for the results in the order specified in the pattern file?
Any help would be greatly appreciated.
Thanks,
John