Good day people,
Kindly advice on below please.
1) Formatting/ Arithmetic operation of given date
I understand from the AIX man date and some research that flag -d is not applicable for AIX shell scripting and some of the UNIX command date command is not available in AIX.
Please advice if there is any possible way for me to perform the identical operation in the following command on AIX.
echo $(($(($(date -d "2010-06-01" "+%s") - $(date -d "2010-05-15" "+%s"))) / 86400)) >> $2
date -d 'last week' >> $2
date -d "2010-01-01 +10 days" +"# %Y-%m-%d" >> $2
date -d "2011/07/13" +%j >> $2
2) Retrieve the first day and last day of month by a Julian date given.
I understand that Julian date of Now could be retrieved as following command.
date +"%r %a %d %h %y (Julian Date: %j)" >> $2
However, if there any function that I could retrieve the first day and last day of month by a Julian date given ?
Otherwise I will try to write a function to fulfill this requirement instead which might involve some regex and conditional case.
I noticed most of the suggestion solution across from research on this is writing a Perl script.. please advice if there is any other work around or AIX command that I can try on...
Appreciate for any advice.
Thank you.