Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: daled@cds9172.Cadence.COM (Dale DePriest)
Subject: Re: Portable startup files question..
Date: 1995/05/24	[thread overview]
Message-ID: <D93vAG.H9x@Cadence.COM> (raw)
In-Reply-To: 3pqfbf$ds0@elron2.elron.net

In article <3pqfbf$ds0@elron2.elron.net>, Ido Sarig <ido> writes:
|> leinberger@axp621.gsi.de (Uwe Leinberger) wrote:
|> >
|> >In article <D8xA28.L5n@fibronics.co.il>, ricky@fibronics.co.il (Ricardo
|> >Marek) writes:
|> >>How can I configure my startup files ( .cshrc, .login, .profile, .tcshrc)
|> >>in order to get arround with the differences between OS types. (setting
|> >>paths,
|> >>environment vars, aliases, etc..), having also the possibility of seting
|> >>particular
|> >>stuff for a certain machine/host/OS System?
|> >>
|> >>- Using `uname` is not the short way, because SunOS and Solaris have the
|> >>same
|> >>  identification.
|> 
|> 
|> No they don't. Use `uname -a` and a simple awk script to get the 3rd field
|> of the output, which is 4.x on SunOS and 5.x on Solaris.
|> 
|> 
|> ------------------------------------------------------------
|> Ido Sarig			|  Phone: (+972) - 3 - 5388846
|> XRunner Project Manager		|  Fax:   (+972) - 3 - 5331617
|> Mercury Interactive Corp.	|
|> 				|  E-mail:	ido@mercury.co.il
|> 
Here is how I do it:
Note that I have had uname return two words on some machines.

case `uname | awk '{print $1}'` in
SunOS)  if [ -f /bin/arch ]
        then  ARCH=`arch`
        else ARCH=sun4v
        fi

Other machines may need a similar treatment for example:

ULTRIX) case `uname -m` in
        RISC) ARCH=decds;;
        VAX)  ARCH=vax;;
        *)    ARCH=deca;;
        esac

-- 
    _      _     Dale DePriest  		San Jose, California
   /`) _  //     daled@Cadence.COM		voice: (408) 428-5249
 o/_/ (_(_X_(`	 				fax: (408) 943-0402



  parent reply	other threads:[~1995-05-24  4:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-05-21  4:00 Portable startup files question Ricardo Marek
1995-05-21  4:00 ` Uwe Leinberger
1995-05-22  4:00   ` Ido Sarig
1995-05-22  4:00     ` Guy Harris
1995-05-24  4:00     ` Dale DePriest [this message]
1995-05-25  4:00       ` Guy Harris
1995-05-26  4:00         ` Thanh Ma
1995-05-26  4:00           ` Guy Harris
1995-06-02  4:00     ` Christopher Samuel
1995-05-21  4:00 ` tim werner
1995-05-22  4:00   ` Guy Harris
1995-05-23  4:00 ` Larry Gale
1995-05-26  4:00 ` Syed Zaeem Hosain
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox