Re: How to export variables on remote machine through ssh.
- From: Joseph Spenner <joseph85750@xxxxxxxxx>
- Date: Tue, 27 Nov 2007 11:19:23 -0800 (PST)
--- gajendrasharma1 <gajendra.sharma@xxxxxxx> wrote:
Hello experts,
I need ur help on solving this problem.
I want to provide these variables to the script
by exporting these
variables after doing ssh and then run the script
that use it, like this:
a=10
ssh -l $user $host "export myVar=$a; cd $myDir;
./myScript.sh"
Can you modify your script to take arguments on the
command line? You could then pass your variables on
the command line. ie:
ssh -l $user $host $myDir/myScript.sh myVar
Then your script needs to contain something like
$myVar = $1
____________________________________________________________________________________
Be a better pen pal.
Text or chat with friends inside Yahoo! Mail. See how. http://overview.mail.yahoo.com/
- References:
- How to export variables on remote machine through ssh.
- From: gajendrasharma1
- How to export variables on remote machine through ssh.
- Prev by Date: Re: How to export variables on remote machine through ssh.
- Next by Date: Re: How to export variables on remote machine through ssh.
- Previous by thread: Re: How to export variables on remote machine through ssh.
- Next by thread: Re: How to export variables on remote machine through ssh.
- Index(es):
Relevant Pages
|