Command working fine in cli but in cron

  • Thread starter Thread starter alajangi
  • Start date Start date
A

alajangi

Hi Experts,

The below command is working fine and creating file with current hour in cli, but in cron it is giving the below error, please suggest me how to get rid from this.

# gunzip -c `find /home/guna/web1/ -iname "bids*" -cmin -30` >> /home/guna/"`date +%Y%h%d%H`.log"(finding within 30min files and writing in new file)

# crontab -e
30 * * * * gunzip -c `find /home/guna/web1/ -iname "bids*" -cmin -30` >> /home/guna/"`date +%Y%h%d%H`.log"(run this cmd 30th min in an hour)
# tail -f /var/mail/root
/bin/sh: -c: line 0: unexpected EOF while looking for matching ``'
/bin/sh: -c: line 1: syntax error: unexpected end of file

Thanks,
Kishore.

Continue reading...
 
Back
Top