Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: A bit of Linux advice yet again??

Re: A bit of Linux advice yet again??

From: Tim X <timx_at_spamto.devnul.com>
Date: 02 Feb 2003 16:39:18 +1100
Message-ID: <87smv744xl.fsf@tiger.rapttech.com.au>


>>>>> "Noons" == Noons <nsouto_at_optusnet.com.au.nospam> writes:

 Noons> "Howard J. Rogers" <howardjr2000_at_yahoo.com.au> wrote in  Noons> news:%kV_9.38366$jM5.97308_at_newsfeeds.bigpond.com and I quote:

>> I was following my old instructions for SuSe 7.1, where .profile
>> worked, but I now realise the error of my ways in hoping that the
>> same operating system would work the same way, regardless of the
>> distro!
>>

 Noons> One thing: bash is very specific to Linux. And to some
 Noons> distributions.  If you want to make sure your code will always
 Noons> behave the same way, then stick to Unix-standard shells.  That
 Noons> means bourne shell and Korn shell.  Both of these use .profile
 Noons> and will work exactly the same across every single Unix
 Noons> flavour you can imagine.

Actually, bash WILL read .profile - it sources profiles in a specific order and stops with the first one it finds. I think .profile is the last one it looks for, wtih .bash_profile, .bash_login searched for first.

With respect to compatibility with Bourne shell, I find it is very compatible as long as you don't use bash specific commands in your .profile - this is very easy to do as the non-compatible aspects of bash are mainly related to scripting features which you rarely see in a .profile.

If you want to increase compatability with Bourne, you can always invoke bash as sh i.e. #!/bin/sh. This is what I tend to do with many shell scripts which I want to run on other flavors of unix.

In an earlier post in this thread, there was also some mention of the Oracle orenv/corenv scripts - these are certainly the way to go as it makes handling different SIDS a lot easier (and even different versions of the db). However, be certain to use the script which matches with your shell - there is both orenv (for Bourne shells) and corenv (For csh shells). One thing I've never understood is why Oracle makes such extensive use of csh and even tcsh for shell scripts - even 13 years ago when I first started unix, the rule of thumb was to only ever use csh/tcsh as an interactive shell and stick to sh for all scripts (or perhaps ksh).

Tim

-- 
Tim Cross
The e-mail address on this message is FALSE (obviously!). My real e-mail is
to a company in Australia called rapttech and my login is tcross - if you 
really need to send mail, you should be able to work it out!
Received on Sat Feb 01 2003 - 23:39:18 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US