If I logon to Unix and define an alias.
I want to start another shell (ie. ksh) and have that alias available to me.
How do I pass an alias to another shell ?
You can put the alias in your $HOME/.kshrc with the -x option to export it to other shells. In the .kshrc you can define other settings like you login prompt (PS1), environment variables, etc. Add the aliases you want.
At logon your Korn shell will read and execute your $HOME/.profile file, and then, will search for a veriable named $ENV, if it exists and points to a file it will read that file and execute it.
And whenever a new Korn shell start again it will search for the file to re-execute it again. You can put in your $ENV file anything what you want to run at init in all your shells (like alias definitions!).
I hope it works...
I hope it works...
Unix was made by and for smart people.
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.