parlepoint
asked on
how i can export private & public variables and alias in ssh login
hi guys..
i want to do ssh and i want use same private & public( variable and alias) in remote machine.
how can i declare those variable in alias?
i want to do ssh and i want use same private & public( variable and alias) in remote machine.
how can i declare those variable in alias?
Forgot to mention.
profile file may be named differently depending upon the shell you use.
If you are using bash then don't forget to do execute source .bash_profile after adding any new entry to the profile file.
profile file may be named differently depending upon the shell you use.
If you are using bash then don't forget to do execute source .bash_profile after adding any new entry to the profile file.
> how i can export private & public variables and alias in ssh login
depends on your shell,
# sh and friends
(set; alias) >myvarsandaliases
# csh and friends
(set; printenv; alias) >myvarsandaliases
depends on your shell,
# sh and friends
(set; alias) >myvarsandaliases
# csh and friends
(set; printenv; alias) >myvarsandaliases
ASKER
i have korn shell will it be work ??
where i have to give this command???
where i have to give this command???
> i have korn shell ..
(set; alias) >myvarsandaliases
> where i have to give this command???
on the command line, obviously ...
(set; alias) >myvarsandaliases
> where i have to give this command???
on the command line, obviously ...
ASKER
do i have to make changes in .cshrc file...or what..
> do i have to make changes in .cshrc file...or what..
no
BTW, why would you change .cshrc when you use ksh?
Did you ever read any manual about your shell?
no
BTW, why would you change .cshrc when you use ksh?
Did you ever read any manual about your shell?
ASKER
do i have to use this command to set alias...like this
set alias my='cd /home/mytest/myresult'
no (at least not in ash, bash, csh, esh, ksh, lsh, pdksh, rsh, sh, tcsh, tsh, zsh, ...)
ASKER
then what command i have to use...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Creating alias is simple just open your *profile* file and add
alias myAlias="some shell command"
e.g. alias LS = "ls -latr"
Hope this information is of some help.
Cheers!