I am trying to grep for a particular text (Do action on cell BL330) in a text file(sample.gz) which is searched in the content filtered by date+timestamp (2016-09-14 01:09:56,796 to 2016-09-15 04:10:29,719) on a remote machine and finally write the output into a output file on a local machine.
Few details of variables passed as a parameter:
server_id = hostname
$do_action_on_cell_2=Do action on cell BL330
ssh -q -o "StrictHostKeyChecking no" $server_id "cd /intucell/data/logs/app; zcat $first_line_log_file | sed -rne '/$first_line_date_time/,/$first_log_first_line/p'| zgrep -A10 -i '$do_action_on_cell_2';" >> ./output.log
However, on executing the above i get the below error
sed: -e expression #1, char 62: unterminated address regex
I think the problem is with sed expression, Please suggest a way forward.