"date" command in Leopard? Alternative?
By macnugget at Sun, Jun 22 2008 11:27am |
Hi,
I'm running Radar Interferometry softwares called ROI_PAC and StaMPS in Mac OS X, which compiled without major problem. But while running, it seems that it calls a utility "date" using something like "date --date=...... " kind of syntax, but this does not seem to be supported by the version in Mac OS X.
My question is: is there a different version of "date" utility supporting this and can be run under Mac OS X?
Thanks
JY



Language
I am not familiar with the programs that you are talking about, what language are they written in?
Maybe GNU vs BSD userland?
I think this might have something to do with the differences between the BSD and GNU userland tools.
I also think you might be able to get around this by installed MacPorts and installing the `coreutils` package.
Be advised that I don't have macports installed myself, so I didn't verify this solution, but I think it's correct.
I just found this page which talks a bit about this issue as well.
Included there is the install command, which I'll repeat here:
After installing MacPorts (if you haven't already), you'd run from the command line:
sudo port -c install coreutils +with_default_namesAlso note that when macports is installed, its path is set ahead of the default system path. So, calling tools you just installed (like rm, cat, date, etc) will by default go to the macports version. Read through the comments on "this page" that I posted above where someone talks about this issue.
One way to avoid any problems w/ installed software expecting the normal Apple/BSD userland tools is to install w/o the
+with_default_namesoption, this would install your newdatecommand asgdate. If you can alter your software to callgdateinstead ofdate, this might be a better option for you.Hope that helps,
-steve
Re: Maybe GNU vs BSD userland?
Hi Steve,
Thanks for the proposed solution. I'll be trying out and report back to the forum.
JY
Re: Maybe GNU vs BSD userland?
Hi Steve,
You exactly nailed the problem!
And by following your suggestion, I also found that both Macports and Fink have "coreutils". and both seem to work the same.
Thank you again!
JY