Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting multiple ENV for Korn shell

Status
Not open for further replies.

mrberry

MIS
Jun 15, 2004
80
US
Does anyone know if there is a way to set multiple ENV for Korn shell logins?

I tried to repeate the line in the users .profile:

ENV=$HOME/.kshrc export ENV
ENV=/system/kshrc export ENV

But the second setting overwrites the first so all the settings in the first are lost.

What I am trying to achieve is setting certain alias for the users, but allowing them to be able to also set their own aliases. The users .profile is not writeable by them because I don't want them to be able to change it.

Thanks,

Mark
 
comtec17, thanks for your reply.

I tried this an none of the kshrc get set with this syntax.

Thanks

Mark
 
Maybe something like this ?
cat /system/kshrc $HOME/.kshrc >$HOME/.kshrc.all
ENV=$HOME/.kshrc.all export ENV

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
OK, I achieved what I wanted to do a different way. I created a system kshrc and set the ENV varable to that. The from within this kshrc I called the users .kshrc.

Thanks to all those who replied.
 
try ksh syntax

export ENV=$HOME/.kshrc

then you need to source it

. $HOME/.kshrc
or
. WHAT-EVER-YOU-WANT

have a look at this dot,
man sh ksh

don't forget, RTFMP :) guggach
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top