From: werner@farina.mc.ab.com (tim werner)
To: ricky@fibronics.co.il (Ricardo Marek)
Subject: Re: Portable startup files question..
Date: 1995/05/21 [thread overview]
Message-ID: <WERNER.95May21135459@farina.mc.ab.com> (raw)
In-Reply-To: D8xA28.L5n@fibronics.co.il
>From: ricky@fibronics.co.il (Ricardo Marek)
>Date: Sun, 21 May 1995 09:55:35 GMT
>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.
This is not true. For me, "uname -r" will return "5.4" for Solaris, and
"4.1.3" for SunOS, "A.09.04" for HP-UX.
You can have a .profile thus:
TCSH=/usr/local/bin/tcsh
if test -x $TCSH ; then exec $TCSH ; fi
You can put something like this in your .cshrc, in case your chsh is
csh because not all the machines you log into have tcsh:
if ( $?term ) then
set TCSH = /usr/local/bin/tcsh
if ( ! $?MYSHELL && -x $TCSH) then
setenv MYSHELL $TCSH
exec $TCSH -l
endif
endif
set whatos = `uname -r | sed 's/\..*//'`
if ( "$whatos" == 5 ) then
# Solaris
else if ( "$whatos" == 4 ) then
# SunOS or Ultrix
endif
else
# HP-UX
endif
YMMV
hth,
tw
--
The shadow of the bamboo sweeps the steps, but the dust does not stir.
next prev parent reply other threads:[~1995-05-21 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
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 [this message]
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