|
I use HP-UX and it does not support "date +%s".
My basic requirement is that I need to find the difference (number of days) between two dates. My idea was to convert the dates to seconds. date +%s -d <date> gives the number of seconds elapsed since 01/01/1970 to the current date. Thus I can get both the dates in seconds & then find difference and then convert it back to days.
But the problem here that as I said earlier, HP-UX does not support date +%s. And I need this to be strictly in ksh and not in perl.
Any help on this will be highly appreciated.
Thanks.
|