Thread (7 messages) flat view 7 messages, 5 authors, 2016-06-15

Re: pretty format can't work on cron job

From: Johannes Sixt <hidden>
Date: 2016-06-15 22:49:59

Am 11/5/2010 9:29, schrieb chen_wang@trendmicro.com.cn:
For the command: git log 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2.. -M --date=short --pretty=format:"Author: %aN <%ae>; Date: %ad" --shortstat --dirstat --no-merges

I run it on shell by manual can create correct format of output, such as:
-------------------------------------------------
Author: Amit Shah [off-list ref]; Date: 2010-10-20
 1 files changed, 14 insertions(+), 3 deletions(-)
 100.0% drivers/char/
-------------------------------------------------

But when I put that command on cron job, even I run “. /etc/profile” and “. ~/.bash_profile” first, I can’t get correct format of output.
-------------------------------------------------
Author: %aN [off-list ref]; Date: Wed Oct 20 13:45:43 2010 +1030
 100.0% drivers/char/
 1 files changed, 14 insertions(+), 3 deletions(-)
-------------------------------------------------
% has a special meaning in a crontab. See man 5 crontab.

-- Hannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help