I need to grep some data from other hosts, but i can't able to get here and store as variable. below are the commands which was I facing. Please suggest me.
DATE="2019-12-19 12:32:11"
LOG_FILE="/tmp/my_log"
ssh my_host grep -oPz "(?s)$DATE.*" $LOG_FILE | grep -i ERROR
bash: -c: line 0: syntax error near unexpected token `('
|
?ssh my_host | grep