But I am trying to see if there is a more elegant formula with substring selection.. even if the values many more than one would usually like to type out like
if ($1==11,23..25)
Hi Anbu23,
I am trying to figure out if I can do say 25 such values without having to do each time #1==value1; $2==value2 etc.
can I put a range say 21 thru 25 in the case above or say 101 thru 199 or 101 thru 150 and 152 thru 155?
---------- Post updated at 04:59 PM ---------- Previous update was at 04:45 PM ----------
I feel egrep may be inefficient when files are very large. (trying to run on actual data and is taking a bit of time)
---------- Post updated at 05:11 PM ---------- Previous update was at 04:59 PM ----------
If your ranges get bigger, then it as an alternative to egrep you can use anbu's solution provided your input file is numerically sorted on the first column, e.g.: