Unexpected EOF while looking for matching `”” syntax error: unexpected end of file

Mails sent from crontab jobs running on your servers may content the following error message :

Unexpected EOF while looking for matching `””

syntax error: unexpected end of file

This is due to the fact that you’re using a command with % options such as the date command.

The crontab daemon misinterprets this sign %. Place a backslash quote before it to make it usable by the date command.

Have a look at this example :

***** echo $(date +%F)>>/tmp/date.txt

rewritten into this way : 

***** echo $(date +\%F)>>/tmp/date2.txt

Thanks for the tip. More details here

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s