bash condition if OS ?

Ladislav Svatos lada-h8kxHjy+vg4AvxtiuMwx3w at public.gmane.org
Wed Apr 7 15:14:59 UTC 2004


On April 7, 2004 10:59 am, Lloyd Budd wrote:
> 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
>
  uname -s

Lada
>
> --
> 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

--
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