Re: AIX 5.2 vs 4.3.3 differences

From: Adams Kevin J (kevin.adams@PHS.COM)
Date: Fri Jun 13 2003 - 13:04:19 EDT


Tony,

One easy way would be to change the first line of your script to read:

#!/usr/bin/ksh93

This works in 5.1 and 5.2.

Obviously just a work around.
Kevin Adams
PacifiCare Behavioral Health
Principal Systems Analyst
AIX Certified Advanced Technical Expert

-----Original Message-----
From: Tony Gallo [mailto:tony_gallo@THRUWAY.STATE.NY.US]
Sent: Friday, June 13, 2003 8:19 AM
To: aix-l@Princeton.EDU
Subject: [aix-l] AIX 5.2 vs 4.3.3 differences

We recently upgraded a 7025 6F0 box from 4.3.3 to 5.2. So far the only
problem that the programmers reported was when they run the following to
manipulate the date:
4.3.3 software:
date=030611 (yymmdd)
date=$(($date+20000000))
echo $date
20030611 (this is the
result we want in yyyymmdd format)

5.2 software:

date=030611
date=$(($date+20000000))
echo $date
20012681

They believe that the leading 0 is causing the number to be treated as an
octal number. It is converting it to octal an then doing the addition
causing the difference. I realize to get the date they should have used
standard date functions but since they did this already, can anyone tell me
an easy way around this so they don't have to start changing all their
code??

TIA

This electronic message transmission, including any attachments, contains information from PacifiCare Health Systems Inc. which may be confidential or privileged. The information is intended to be for the use of the individual or entity named above. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited.

If you have received this electronic transmission in error, please notify the sender immediately by a "reply to sender only" message and destroy all electronic and hard copies of the communication, including attachments.



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:55 EDT