Cron fails on single apostrophe

前端 未结 3 1541
一整个雨季
一整个雨季 2021-02-08 19:37

The following does work as expected:

date +\'%d-%b-%Y-%H-%M\'

28-Sep-2009-14-28

But none of the following 4 entries from crontab are working.

* *         


        
3条回答
  •  天涯浪人
    2021-02-08 19:52

    As long as there are no spaces in the format string supplied as an argument to date, you should not need the ticks at all.

    date +%d-%b-%Y-%H-%M
    

    should work.

提交回复
热议问题