Marc André Selig wrote: > On 5/7/07, David Liontooth <[EMAIL PROTECTED]> wrote: >> In OSX, /bin/date doesn't support the -d switch > > But it does have the -r switch. ;-) > > [...] > >> To pick >> the date, I use >> >> DAY="$(date -d "-$1 day" +%F)" >> >> The -d switch allows me to subtract days (or minutes or seconds) from >> today's date. >> >> Is there a way to subtract n days from a date using the OSX date >> utility? > > Something like this? > > date -r `date +%s-n*24*60*60|bc` +%F > > Regards, > Marc
Wow, that was fast! So I have a way to do it with the native coreutils. Dave _______________________________________________ macports-users mailing list [email protected] http://lists.macosforge.org/mailman/listinfo/macports-users
