awk - check time stamp between range or not

I want to check given time stamp is between the given time stamp or not. I am using AIX.

YYYYMMDDHHMMSS
abc.csv
START TIME, END TIME
20130209018000,20130509022000
20120209018000,20130509022000
20120209018000,20130509022000

Script will check given time stamp is between above two range or not.
Eg: 20130509022000
Will return rows from abc.csv where time stamp is between or equal to start time & end time.

Please advise.

ts=$1

awk -F, -v T="$ts" 'NR > 1 && T >= $1 && T <= $2' abc.csv
1 Like

thanks! will check it.