We have just moved the database to a larger SUN box. We have many shell scripts that had the line:
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:
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:
# date +%c%m%d
Thu 25 Apr 2002 04:10:51 PM EDT0425BUT, if I do su - to root, I will get:
Sun Microsystems Inc. SunOS 5.8 Generic February 2000
# 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?
is switch user with that user's .profile
just su is
switch user with current user's profie.
u may want to check the Oracle user's .profie and set it accordinly ( may be the shell reference is the problem here ).
Thanks for the reply. I know the difference between su and su -. We are using the same .profile as on the old machine. Could you elaborate a little more on shell reference? Thanks!
Type 'ps' to check the shell you are using.
Can also have a look in /etc/passwd for the shell you are using DO NOT modify this file.
change shells by typing ksh, sh, csh - for kourne, bourne, cshell based on what root uses and then retype command.
check roots. profile in /.profile
may have a variable set which oracle does not have set.
Once you have eliminated all of the impossible,
whatever remains however improbable,
must be true.
Click Here to Expand Forum to Full Width