Re: spawn sh -c "ssh -T $host -l $user <$JOBSCRIPT" #HowCanI elim sh?



In article <1217464115.356303@xxxxxxxxxxxx>,
Name withheld by request <anonb6e9@xxxxxxx> wrote:
.
.
.
OK then I can stick to bash, or a smaller shell.
(cygwin comes w/a small shell called 'ash'.)

Is it enough to have Expect read each line of $JOBSCRIPT and
pass it to the spawned ssh?

I'm not smart enough to know, I could test your soln though.

What kind of control do you have over $JOBSCRIPT?

not much, I'm using the expect script as a wrapper/launcher for cygwin
cron jobs (so just about any script needs to be sypported). The user's
credentials in a cygwin cron job are not sufficent to write to remote
(network) drives, hence the password-authenticated ssh session.
.
.
.
Ah-ha! So $JOBSCRIPT ranges over a loosely-defined universe,
and cron and cygwin are involved. If I were in your shoes, I
would be thankful that bash is handling all the environment
configuration for me, and retain what already is working.
Although, yes, there are more precise solutions possible, I'm
almost certain they'd be tedious to get right. Keep what works.
.