Print entire line only if certain fixed character matches the string

Hi All,

I have a file testarun.txt contains the below lines and i want to print the lines if the character positions 7-8 matches 01.

201401011111
201401022222
201402013333
201402024444
201403015555
201403026666
201404017777
201404028888
201405019999
201405020000

I am trying the below command
but im not getting the desired output of 5 lines which contains only 01 in the position 7-8.

awk '{ if (cut -c7-8 == 01) {printf $0} }' testarun.txt

Please help and this very emergency for me.

Thanks!

perl -lne 'print if substr($_, 6, 2) == 01;' testarun.txt

using awk:

awk 'substr($0,7,2) == "01"' testarun.txt
egrep '^.{6}01' testarun.txt

or, if you would like to stick to a even more limited version of grep:

grep '^......01' testarun.txt

I seem to be in one of two modes; if I have to initiate an interpreter I try and do everything in it; if I can get away with only using "simple" utilities I do.

Or

grep '^.\{6\}01' testarun.txt