I have strings like this in a file on unix machine
26 3 24 21 391
26 34 24
26 3 49 24 21 391
26 94 24
26 3 21 391
26 3
27 3 24 21 391
2 94
Now I want to match more than one numbers at a time. These numbers are fixed ( constants) and doesn't need matching pattern to recognise them. So here if I want to match either 94 or 24 I will use below expression.
grep '\b\(94\|24\)\b' file_name.txt
But I actually need to find those string which has neither 94 nor 24. That means I want all the rows which not contains any of these numbers. I don't want to use options which come with grep ( like -v ).
EDIT: Expected output -
26 3 21 391
26 3