Like what
I use orders in CRONTAB-E.
Echo-e "' Date ' +%s ' \t$random" >/tmp/xxx
Words
Direct use of command line no problem
But when it was written in Cron,
'% ' needs to be escaped into ' \% '
The reason has not been found
The reason has finally found
Look at Crontab's help under Linux
Mans 5 Crontab
In this section:
Percent-signs (%) in the command,
Unless escaped with backslash (\), 'll is changed into newline charac-
Ters, and all of the data after the ' the ' the ' a ' is sent to the command as
Standard input.
Probably meant to say
In the sixth column of the Cron file, which is the command column
A percent semicolon (%) is given a special meaning
is considered a newline character, and the content behind it is used as the standard input for the command
So, the ability to use the percent sign (%) normally
You need to add an escape character (\) before it