1834101 Members
2903 Online
110063 Solutions
New Discussion

need some help in sh

 
SOLVED
Go to solution
jayachandran.g
Regular Advisor

need some help in sh

hi friends

i'm little bit confused with the shell starting files

for a example i'm using sh as my shell in this in which file i will keep the shell variables like

stty erase etc
TERM=vt100

for all my telnet clients too
can you just help in this
thank you
9 REPLIES 9
Robert-Jan Goossens_1
Honored Contributor

Re: need some help in sh

Hi.

the $HOME/.profile

Regards,
Robert-Jan
DCE
Honored Contributor

Re: need some help in sh

There are several places to put shell settings.

System wide settings you wish to apply to all users logging on to the system should go in /etc/profile

customized settings for the individual users should be placed in the indiviuals .profile file in their home directory



Dave
Gopi Sekar
Honored Contributor

Re: need some help in sh


if you want these settings to be specific to a user then set it in $HOME/.profile where $HOME refers to the home directory of the user

if you want this to affect all the users logging in to the system (including root) then set it in /etc/profile which is a global script file which gets executed every time a user logs in
Never Never Never Giveup
jayachandran.g
Regular Advisor

Re: need some help in sh

Hi Gopi, Robert,

I think my way of quetioning is wrong for all other shells like bash csh r ksh have thier own start up scripts like

bshrc,cshrc, and kshrc like that what is for sh.

if i put it on $HOME/.profile or /etc/profile it is comman for all shells i want somw thing specific ofr this sh shell only.

and "stty erase" command i think it wont work if we put it on profile files

i may be wrong... you people may have good reason for telling like this please explain me..

thank you

Gopi Sekar
Honored Contributor

Re: need some help in sh


for bash shell i believe it is /etc/bashrc and $HOME/.bash_profile
Never Never Never Giveup
DCE
Honored Contributor

Re: need some help in sh

The $HOME/.profile sets the environment for just the specific user, and does not affect any other users on the system.



Dave
Patrick Wallek
Honored Contributor
Solution

Re: need some help in sh

~/.profile works for sh and ksh.

~/.login and ~/.cshrc work for the csh.

jayachandran.g
Regular Advisor

Re: need some help in sh

Hai

i some problem in english too it may be so DCE and Gopi may not be able to get my question.

Gopi and DCE you people are correct but i know for bash shell and env through profile files...

but my question is for sh

thank you Patrik i was having doubt abt ksh also you have cleared all


thaks a lot

bye bye
jayachandran.g
Regular Advisor

Re: need some help in sh

it is really good