delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/12/01/23:27:27

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Mon, 1 Dec 2003 23:20:47 -0500 (EST)
From: David Strozzi <dstrozzi AT MIT DOT EDU>
To: cygwin AT cygwin DOT com
Subject: scripting sftp in a bash script
Message-ID: <Pine.GSO.4.55L.0312012315060.4922@scrubbing-bubbles.mit.edu>
MIME-Version: 1.0

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019