start_time="2021-02-10 08:17:38" end_time="2021-02-10 09:17:38" ssh email@example.com "awk -v start_tm=$start_time -v end_tm=$end_time '\$0 >= start_tm && \$0 <= end_tm' /var/log/app.log"
I am facing below error.
awk: cmd. line:1: 08:17:38 awk: cmd. line:1: ^ syntax error
The same awk command is working if I execute after SSH to the server. even I tried to keep backslash \ before & command. I am new to shell scripting, please suggest what other things need to take care.