Why I'm getting unexpected EOF for my cron job?
You may need to escape the %
with a \
. %
is a special character to the crontab, which gets translated to a newline, so your code was probably becoming
-p']T
zw51'
Try:
-p']T\%zw51'
crontab script fail: end of file unexpected (expecting )) when call $(date)
%
has special meaning in a crontab (it represents a newline), so you need to escape it to specify a literal percent sign.
0 5 1 * * goaccess ... > /home/xan/reports/report-week-$(date +\%Y.\%m.\%d).html
Related Topics
How to Ask Bash for the Current Options
Combine Two CSV Files Based on Common Column Using Awk or Sed
Command Substitution Doesn't Work in Script Text Passed Over Ssh
How to Start/Restart/Stop Apache Server on Linux as Non-Root User
Resolve Relative Relocations in Partial Link
Old Logs Are Not Imported into Es by Logstash
Using Ssh to Run a Cleartool Command with Agruments on Remote a Linux MAChine
Setting Environment Variable to a Large Value -> "Argument List Too Long"
Are the 'Dot' and 'Dot Dot' Files in Unix and Linux Real Files
Update Specific Field in Text File in Specific Line
Python Error "Attributeerror: 'Module' Object Has No Attribute 'Sha1'"
Asp Net Core Linux Err_Connection_Refused
Using Sed Replace Line in File with Another File
Why Does Bash Behave Differently, When It Is Called as Sh
How to Get the Exit Status of the First Command in a Pipe
Replace Text Between Two Lines with Contents of a File Stored in a Variable in Sed