Hello -
I am new to unix... very new. I am running a program at the command prompt:-
nohup ./ledger - comptroller_extract 05/11/2018 &
The above runs as expected.
If I put it in a sh script:-
current_date=$(date+%m/%d%y)
nohup ./ledger - comptroller_extract $current_date &
This does not work. It is as if the date is ignored.
rdrtx1
May 11, 2018, 10:03am
2
current_date=$(date +%m/%d/%Y)
(include space before plus and upper case Y
for 4 digit year)
1 Like
are u saying the Uppercase Y should be lower case >
---------- Post updated at 09:43 AM ---------- Previous update was at 09:19 AM ----------
Thank you so much!!! It is working!!!!!
1 Like
You were also missing a slash (i.e. /
) before the %Y
in you date
format string (as in +%m/%d/%Y
), but I assume you have already fixed that if it is working for you now.
Thank you for your help.
I created a cron entry on the user and it is working.