Unable to add user defined variable

Hi,
I have a user defined variable _TIME1=xxx
I am using awk command for pattern matching.

cat $_LOCATION/catalina.txt | awk '/^`$_TIME1`:??:??/'

It not taking the value of $_TIME!
eg:I am using the command to get all the patter from 12:00:00 to 12:59:59

The user defined variable changes according to the system time.

Thanks,
Ahamed

Try:

awk "/^$_TIME1:..:../" "$_LOCATION/catalina.txt"

or

grep "^$_TIME1:..:.." "$_LOCATION/catalina.txt"

Thanks buddy!
It was working fine :slight_smile: