problem with sftp exit code

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
hi allUsing sftp to transfer files, i'd like to get a return code > 0 as
seen in the man page if for example i cant transfer a file using the put

Also used in batch mode sftp should abort if one of the commands in the
input file fails. I've tried and even if a put fail the sft session

In all cases the sftp session teminates with a retrun code = 0

Any idea to solve my problem ??

Thank's in advance

Re: problem with sftp exit code

Quoted text here. Click to load it

I'd do a new client+server in Perl that runs a protocol you want -
with 2xx, 5xx messages etc, file names and sizes.  Then you call this with ssh.

I've done this at work and got over 400 hosts no longer using FTP to hand
in regular results.

Elvis Notargiacomo        

Site Timeline