Answer the question
In order to leave comments, you need to log in
How to organize grep correctly?
The bottom line: you need to sort the document three times for three different results, and then compare these results with each other in order to deduce the discrepancy.
It is desirable to raise all this in the form of a bash script.
What is the best way to organize this? So far, only using the tee command comes to mind, saving the output with it in 3 different documents (or in one?) And comparing the lines in it somehow. I would be grateful for any hints.
Answer the question
In order to leave comments, you need to log in
cat 111.txt | grep 1 | grep 2 | grep 3
And even better show what is and what needs to be done
That's right - it's more clear to ask a question.
For example, give an example of input data and an example of the desired result.
I don't really understand what you want to do, but tee allows you to output the same output to multiple files, rather than different results for comparison.
string comparison can somehow be done through the diff utility
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question