?
Solved

How to run .kshrc

Posted on 2004-11-12
4
Medium Priority
?
2,030 Views
Last Modified: 2011-05-05
Hi,

I want to run a .kshrc file everytime i login.
I have copied the .kshrc file from my colleague's account.
But the scripts she has written are not executing in my account.
like at the prompt is still remaining
xys%
instead of
myid@hostname in pwd%

I just thought copying the .kshrc file will do it as on login, it is executed.

Do i need to do something else too?

This is Solaris OS. i am connecting remotely from Windows NT using Exceed.

Thanks,
0
Comment
Question by:dkamdar
  • 2
4 Comments
 
LVL 1

Expert Comment

by:jharriss
ID: 12567277
What is your default shell?  It would have to be ksh in order for the .kshrc to process.  You can find out what shell you are running once you are logged in by executing the command, whodo.  You should see output like the following.
[root@server1 /]# whodo
Fri Nov 12 10:17:05 CST 2004
server1
 
pts/1        user     10:16
    pts/1          934    0:00 sh


0
 

Author Comment

by:dkamdar
ID: 12567747
Hi,

it is korn shell thats why i was modifying .kshrc
I found out what the problem was ... i had to export PS1 variable instead of prompt ...

Thanks Anyways
0
 
LVL 2

Accepted Solution

by:
stokesj56 earned 200 total points
ID: 12580954
You need to add the environment setting ENV to your .profile. This setting needs to point to your .kshrc (or whatever you name it). I.E:

  ENV=$HOME/.kshrc
  export ENV

After adding these line to your .profile logout and back in again. It should pick up the .kshrc now.

If you change something in the .kshrc and want to source the new file then from your command prompt in your home directory enter ". .kshrc". This will read in and execute the new settings.
0
 
LVL 2

Expert Comment

by:stokesj56
ID: 12617558
I appreciate the points. But, why only a grade of C? Was there something I didn't explain well enough? If so let me know what and I will further explain.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Occasionally Windows/Microsoft Updates will fail to update. We have found a code that will delete all temporary files and re-register all dll's related to Windows/Microsoft Updates! This works 99% of the time to get the updates working again! The…
Introduction Often we come across situations wherein our batch files would be needing to reboot Windows for a variety of reasons. A few of them would be like: (1) Setup files have been updated whose changes can take effect only after a reboot …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question