Can someone tell me how to do sourcing once in korn shell. Cause whenever I open up a new terminal, or whenever I login, I have to do a source on .profile everytime. I can't find help anywhere.
If I telnet to the machine(s), the .profile is read. (I am a korn shell user)
If I open the terminal from the gui, (ie eXceed/local console) the .profile is not sourced...
I have seen scripts that check to see if the login is via gui, and if so, source the .profile, but haven't been able to locate something decent recently.
Here's another option. We also use the korn shell, but we use the arrow keys on the keyboard to go through the command history.
In the .profile use the following :
set -o emacs
alias __A=`echo "\020"` # up arrow = ^p = back a command
alias __B=`echo "\016"` # down arrow = ^n = down a command
alias __C=`echo "\006"` # right arrow = ^f = forward a character
alias __D=`echo "\002"` # left arrow = ^b = back a character
alias __H=`echo "\001"` # home = ^a = start of line
Instead of having the .profile calling .kshsrc why not code everything in the .profile.
My .profile works and I invoke korn shell thus: -
exec /bin/ksh -o vi
According to O'Reilly's "Unix in a Nutshell", ksh executes both /etc/profile and $HOME/.profile at login. Unlike csh however, there is no file that is executed by default for every new shell. You can however, force it to do so by exporting the variable ENV, set to the name of the file to be executed.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.