|
From: Boniforti F. <fl...@pi...> - 2009-11-23 13:26:26
|
> FIRST_DAY=`date -d "-$(($(date +%d)-1)) days" +%Y-%m-%d` > LAST_DAY=`date -d "+1 month -$(date +%d) days" +%Y-%m-%d` I just discovered that it doesn't assign correctly the value I want, in gnuplot: gnuplot> FIRST_DAY=`date -d "-$(($(date +%d)-1)) days" +%Y-%m-%d` gnuplot> print FIRST_DAY 1997 While at the usual bash prompt I get: storebox:~# date -d "-$(($(date +%d)-1)) days" +%Y-%m-%d 2009-11-01 How come? Thanks, Flavio Boniforti PIRAMIDE INFORMATICA SAGL Via Ballerini 21 6600 Locarno Switzerland Phone: +41 91 751 68 81 Fax: +41 91 751 69 14 URL: http://www.piramide.ch E-mail: fl...@pi... |