I have below command in cron.d
*/5 * * * * root /usr/bin/pgbadger --prefix '%t [%p]: <%u:%d:%r> ' -f stderr -q `/usr/bin/find /pgdata/log_test -mtime -6 -name "*.log"` -o /pgdata/log_test/pg_report-`date +%F`.html
The command runs when run from the shell but when putting it in cron.d it gives below syntax error.
/bin/sh: -c: line 0: unexpected EOF while looking for matching `''
/bin/sh: -c: line 1: syntax error: unexpected end of file
I am not sure where to escape the single quote.
Thanks