What’s wrong with these two cron job’s?
I want to print a formatted output from a file containing lines of date, time, long number, and long number. I set
LC_NUMERIC to UTF and use the
%'d flag characters to produce numeric grouping of thousands.
The following line in crontab produces an error of
/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
when the cronjob runs.
@daily LC_NUMERIC=en_US.UTF-8 /usr/bin/printf "%s %s %'d %'d\n" \ $(/usr/bin/tail -n 31 /var/log/bandwidth)
Newline added for readability
The identical line (without
@daily) in a script works fine.
I would guess that cron is choking on the
%'d part and can't find the closing