Home » Infrastructure » Linux » .bash_profile (6.6 RHEL)
.bash_profile [message #638327] Tue, 09 June 2015 09:19 Go to next message
krish96
Messages: 74
Registered: October 2012
Member
Hello Experts,

Is there a way to automatically execute .bash_profile or propmts for setting evironment variables after you login into server, Instead of running executing .bash_profile manually everytime you login to server..

Thanks in advance..
krish
Re: .bash_profile [message #638330 is a reply to message #638327] Tue, 09 June 2015 09:57 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

This question bears no real connection with Oracle database.
Please find a more appropriate forum.
The topic is locked. /forum/fa/448/0/
If I'm wrong, please, PM me (or report this message to a moderator, explain why you think it should be unlocked and it might be done).

Re: # .bash_profile of linux server [message #638743 is a reply to message #638327] Fri, 19 June 2015 08:13 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
slow learner?
http://www.orafaq.com/forum/m/638330/#msg_638330
Re: # .bash_profile of linux server [message #638744 is a reply to message #638743] Fri, 19 June 2015 08:15 Go to previous messageGo to next message
gazzag
Messages: 1118
Registered: November 2010
Location: Bedwas, UK
Senior Member
Lousy memory Wink
Re: # .bash_profile of linux server [message #638745 is a reply to message #638743] Fri, 19 June 2015 08:16 Go to previous messageGo to next message
krish96
Messages: 74
Registered: October 2012
Member
i dont't think you have a answer ..
Re: # .bash_profile of linux server [message #638746 is a reply to message #638744] Fri, 19 June 2015 08:17 Go to previous messageGo to next message
krish96
Messages: 74
Registered: October 2012
Member
yeah just like you ..
Re: # .bash_profile of linux server [message #638747 is a reply to message #638744] Fri, 19 June 2015 08:20 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
gazzag wrote on Fri, 19 June 2015 06:15
Lousy memory Wink

So if I answered you today, you would post same question again next week.
So not worth my effort to do more.
Re: # .bash_profile of linux server [message #638748 is a reply to message #638747] Fri, 19 June 2015 08:23 Go to previous messageGo to next message
krish96
Messages: 74
Registered: October 2012
Member
I dont see that you have already replied to this with a solution .. Shocked
Re: # .bash_profile of linux server [message #638759 is a reply to message #638748] Fri, 19 June 2015 18:17 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
as a *NIX learning exercise place the following line in your .bash_profile file

date >> /tmp/login_capture.txt

Realize that .bash_profile is only executed when you actually LOGIN to the OS; not when you open a new Terminal window.
You can observe this behavior by inspect the contents of /tmp/login_capture.txt any time you get curious about its content.
Some, many, most professional DBAs maintain their own database specific configuration files; like DEV.env, QA.env, PROD.env, DWH.env, etc. & source in the desired file prior to initiating activity against the specific database.
Depending upon .bash_profile to establish Oracle environment is amateurish at best.
Re: # .bash_profile of linux server [message #638777 is a reply to message #638759] Sat, 20 June 2015 09:38 Go to previous message
EdStevens
Messages: 1376
Registered: September 2013
Senior Member
BlackSwan wrote on Fri, 19 June 2015 18:17

Some, many, most professional DBAs maintain their own database specific configuration files; like DEV.env, QA.env, PROD.env, DWH.env, etc. & source in the desired file prior to initiating activity against the specific database.


I'd agree with the "some" and even perhaps the "many". Not so sure about the "most". Maybe I'm in the vast minority and don't know it (who really is in a position to know for sure?)but I just rely on oraenv. Not sure of the advantage, if any, of a series of custom scripts when oracle has already provided a good one.

That said, I do have a series of 'env' scripts to be executed at the command line on my one pair (prod and test) of Windows boxes.

Quote:
Depending upon .bash_profile to establish Oracle environment is amateurish at best.


To that I agree completely.
Previous Topic: recover missing delete /usr/*
Next Topic: unable to connect for linux server to database (merged)
Goto Forum:
  


Current Time: Thu Mar 28 16:33:34 CDT 2024