Awk extract a range of values

Hi
Input

10    131
11    179
11    170
20    142
20    131
20    144
21    178
22    155
22    196
23    144
23    184
24    194
24    191
24    218
25    167
25    131
26    189

Output

11    179
11    170
23    144
23    184
24    194
24    191
24    218
25    167
25    131

   

I can try

awk '{if($1==11|$1==23|$1==24...){print $0}

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) :stuck_out_tongue:

awk ' $1 == 11 ; $1 == 23, $1 == 25 ' file
egrep '^(11|23|24|25)[[:space:]]' infile

or e.g.

egrep '^(11|2[345])[[:space:]]' infile

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 ----------

Scrutinizer,
Thanks your code worked fine.

Range syntax is not available in awk

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.:

awk '$1 == 21, $1 == 25;  $1 == 101, $1 == 199 ' infile 
awk '$1 == 101, $1 == 150;  $1 == 152, $1 == 155 ' infile 

---------- Post updated at 23:20 ---------- Previous update was at 23:13 ----------

Or you can do this, without the sort prerequisite

awk '21<=$1 && $1<=25 || 101<=$1 && $1<=199 ' infile

Thank you.