We have just moved the database to a larger SUN box. We have many shell scripts that had the line:
date +%c%m%d
to display and then grep date and time from it. It should look like:
Thu Apr 25 15:20:55 20020425
But on the new machine, it will be like:
/export/home/oracle>date +%c%m%d
Thu 25 Apr 2002 03:18:15 PM EDT0425
The strange part is that if I do su to switch to root, and do the same thing, it will display:
:/export/home/oracle>su
Password:
# id
uid=0(root) gid=1(other)
# date +%c%m%d
Thu 25 Apr 2002 04:10:51 PM EDT0425BUT, if I do su - to root, I will get:
:/export/home/oracle>su -
Password:
Sun Microsystems Inc. SunOS 5.8 Generic February 2000
# id
uid=0(root) gid=1(other)
# date +%c%m%d
Thu Apr 25 16:09:56 20020425
which is the correct form we need.
Could anyone suggest how I can get the display for oracle user the way we want?