[CLUE-Tech] ssh - how to pass parameters along with a script?
    Jeffery Cann 
    jc_cann at yahoo.com
       
    Fri Apr 25 14:30:06 MDT 2003
    
    
  
Greetings.
I have a simple little shell script.  The entire thing
is double quoted (see below) so I can pass the script
to a remote server for its execution.  This is
different than the intent of ssh to run a remote
command.  I am sending the command(s) I want to run to
the remote server (instead of running a script that
resides on it), e.g.,
$ ssh remote < script.sh   - or - 
$ ssh remote `cat script.sh` 
The question:  how can I pass along parameters with my
script?  I want to do something like:
$ ssh remote < script.sh "param1 param2"  
but the shell doesn't understand my intent.  I want to
send parameters to the remote shell when it runs the
'script.sh'.  I'm stumped.
I appreciate any suggestions.
Jeff
-------------- script.sh -----------------
"DEPLOY_HOME=/tmp/iasdeploy/jaws
if [ ! -d $DEPLOY_HOME/$2/$3 ]
then 
	/bin/mkdir -p $DEPLOY_HOME/$2/$3
	/usr/bin/chmod 777 $DEPLOY_HOME/$2/$3
else 
	return 0
fi"
=====
Planet Earth (tm)
http://jefferycann.com/
__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com
    
    
More information about the clue-tech
mailing list