This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
scripting sftp in a bash script
- From: David Strozzi <dstrozzi at MIT dot EDU>
- To: cygwin at cygwin dot com
- Date: Mon, 1 Dec 2003 23:20:47 -0500 (EST)
- Subject: scripting sftp in a bash script
Hi,
(I have a feeling this has been asked before, but I can't find it.)
I'm trying to use sftp within a bash script on cygwin (version 1.5.5 on
winXP pro). Ideally I'd like to use a 'here document' rather than using
an external batchfile, that is,
sftp /dev/stdin <<EOF
<ftp commands>
EOF
The problem is the /dev/stdin. This normally isn't necessary for 'here
documents,' and isn't with ftp. However, with sftp, for reasons I don't
understand, you need to add the /dev/stdin to use here documents. This
doesn't seem to work under cygwin.
Does anyone know how to produce this behavior?
Or, are there other ways to script/call sftp (or a _secure_ equivalent)?
I'm not subscribed to this list, so please cc my email address in your
reply.
Thanks very much.
------------------------
David Strozzi
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/