1753259 Members
5082 Online
108792 Solutions
New Discussion юеВ

Re: pbrun ksh & .profile

 
SOLVED
Go to solution
nagendra_3
Advisor

pbrun ksh & .profile

Hi,
I have a couple of aliases in my .profile
when i login[ As regular user] they work fine , then after i do a pbrun ksh[ To get the root access] they get lost.

Can you please give me a suggestion as to how to retain them.

Because it is getting cumbersome to always type in all the aliases in new telnet window every time i logIn

Thank you
Nag

Knowledge is Power
6 REPLIES 6
Oleg Zieaev_1
Regular Advisor

Re: pbrun ksh & .profile

Hello.

You might want to specify your aliases in /etc/profile, so they are global for all
users.

Hope this helps,
0leg
Professionals will prevail ...
nagendra_3
Advisor

Re: pbrun ksh & .profile

Thanks,But No
I cannot do that because that will applicable for all the user.

Cheers,
Knowledge is Power
James R. Ferguson
Acclaimed Contributor
Solution

Re: pbrun ksh & .profile

Hi:

If you don't want to put your 'alias'es in a .profile put them in any file of your choice so that you can source them when you want. Assuming the $HOME/myaliases' contained them:

. $HOME/myaliases

Note the dot/space before the filename.

Regards!

...JRF...
Oleg Zieaev_1
Regular Advisor

Re: pbrun ksh & .profile

Ok.
Did you try this:
With name specified without =value, print the specified alias.

With -t, set tracked aliases. The value of a tracked alias is
the full path name corresponding to the given name. The value of
a tracked alias becomes undefined when the value of PATH is
reset, but the alias remains tracked. With name=value omitted,
print the list of tracked aliases in the form name=pathname on
standard output.

With -x, set exported aliases. An exported alias is defined
across subshell environments. With name=value omitted, print the
list of exported aliases in the form name=value on standard
output.

Alias returns true unless a name is given for which no alias has
been defined.

Hope this helps,
0leg
Professionals will prevail ...
Oleg Zieaev_1
Regular Advisor

Re: pbrun ksh & .profile

Hello.

One of the solutions available is described on :
http://www.dutchworks.nl/htbin/hpsysadmin?h=3&dn=54004&q=%22exported%20alias%22&fh

Have a look. This might be of use for your case.

Hope this helps,
0leg
Professionals will prevail ...
nagendra_3
Advisor

Re: pbrun ksh & .profile

Hi JRF,
. it worked great.

Earlier i tried it as
sh

Can you please let me know as to why it was not working[ in the case of sh filename]. I was just wondering what was the difference.

thank you again.

Cheers,
Knowledge is Power