Hi, pchang.
Quote:
Originally Posted by pchang
aix...
please provide example of GNU's date utility regardless and this might give me a clue.
Thank you.
|
Here are a few phrases
date can understand and one that it cannot:
Code:
#!/bin/bash -
# @(#) s1 Demonstrate GNU date flexibility.
head -1 /etc/issue.net
echo
echo "(Versions displayed with local utility \"version\")"
version >/dev/null 2>&1 && version =o $(_eat $0 $1) date
set -o nounset
echo
echo " GNU date with English-like expressions:"
echo
date --date="2 weeks ago"
date --date="two weeks ago"
echo
date --date="today + 1 month"
date --date="3 years + 2 days"
exit 0
Producing:
Code:
$ ./s1
CentOS release 5 (Final)
(Versions displayed with local utility "version")
Linux 2.6.18-53.1.13.el5vm
GNU bash 3.1.17
date (GNU coreutils) 5.97
GNU date with English-like expressions:
Sat Jul 5 15:55:46 CDT 2008
date: invalid date `two weeks ago'
Tue Aug 19 15:55:46 CDT 2008
Thu Jul 21 15:55:46 CDT 2011
As you can see, GNU date is extremely flexible.
I don't have access to an AIX box, but I suggest you look over
man date to see if it has anything close ... cheers, drl