bash condition if OS ?

Lloyd Budd lloyd-fEEwcc3XMu8jODpR/OX0VQ at public.gmane.org
Wed Apr 7 14:59:09 UTC 2004


Hi,

I am trying to combine some of my '.bash_profile's and '.bashrc's from 
various OSs into one file of each.  I have condition on hostname, but 
would like to generalize some parts on OS.  $OSTYPE is useful, though 
some OSs have the annoying habit of including version # in OSTYPE.  Is 
there a better variable to use?  Short of using an external prog I 
cannot seem to figure out how to  use Bash's reg exp to check for 
substring at beginning of the string. ?

Thank you,
Lloyd

--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list