spawn sh -c "ssh -T $host -l $user <$JOBSCRIPT" #HowCanI elim sh?
- From: anonb6e9@xxxxxxxxxxxx (Name withheld by request)
- Date: 30 Jul 2008 00:35:02 GMT
pls consider this snip of expect:
spawn /bin/bash -c "ssh -T $host -l $user <$JOBSCRIPT"
# had to use the 'sh -c' approach support the '<' redirection
# ====================================================================
# wait for passwd prompt
# normal next send enters password
# ====================================================================
set __comment_on_last_send "no send yet, just spawned ssh"
expect {
"assword:" {
send "$PW\r"
set _comment_on_last_send "passwd entered, waiting on job completion..."
}
--snip
Is there a way to eliminate the bash shell in the spawn above?
Notice that the remote script is supplied as the STDIN to ssh.
--
thanks/regards
.
- Follow-Ups:
- Re: spawn sh -c "ssh -T $host -l $user <$JOBSCRIPT" #HowCanI elim sh?
- From: Name withheld by request
- Re: spawn sh -c "ssh -T $host -l $user <$JOBSCRIPT" #HowCanI elim sh?
- From: Cameron Laird
- Re: spawn sh -c "ssh -T $host -l $user <$JOBSCRIPT" #HowCanI elim sh?
- Prev by Date: Re: How to increase buffer for text widget
- Next by Date: Re: spawn sh -c "ssh -T $host -l $user <$JOBSCRIPT" #HowCanI elim sh?
- Previous by thread: How to increase buffer for text widget
- Next by thread: Re: spawn sh -c "ssh -T $host -l $user <$JOBSCRIPT" #HowCanI elim sh?
- Index(es):
Relevant Pages
|