bash condition if OS ?
Chris Gow
cgow-FlpYSvOe4acWeH+WijV1tNBPR1lH4CV8 at public.gmane.org
Wed Apr 7 14:13:09 UTC 2004
I'm not a script writer, but we have a number of bash scripts here and
we appear to use uname to determine what we're running on.
Seems to work for cygwin/solaris/linux.
-- chris
On Wed, 2004-04-07 at 10:59, 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
>
> --
> 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