please advice what wrong with my awk syntax and how to fix it ( this syntax is in my ksh script ) and I run my script on linux machine
my target is to get from the file.txt only the lines that between the dates:
FROM 2012-04-19 TO 2012-04-22
remark - other solution can be with perl
[root@test1 /var/tmp]# a='2012/04/19'
[root@test1 /var/tmp]# b='2012/04/22'
[root@test1 /var/tmp]# awk -v A=$a -v B=$b '/A/,/B/' file.txt
awk: syntax error near line 1
awk: bailing out near line 1
file.txt
[ 2012/04/18 21:49:01:857 ] Monitor::handle_client_message():
[ 2012/04/18 21:50:02:379 ] Monitor::handle_client_message(
[ 2012/04/18 21:57:52:64 ] Monitor::handle_client_message():
[ 2012/04/18 21:57:52:252 ] Monitor::handle_client_message(
[ 2012/04/18 21:58:46:958 ] Monitor::handle_client_message():
[ 2012/04/19 21:58:46:958 ] Monitor::handle_client_message():
[ 2012/04/20 21:58:46:958 ] Monitor::handle_client_message():
[ 2012/04/21 21:58:46:958 ] Monitor::handle_client_message():
[ 2012/04/22 21:58:46:958 ] Monitor::handle_client_message():