如何尝试与heredoc进行3次SFTP连接并发现错误?我如何重组这个是正确的?在do
count=0; until sftp -o StrictHostKeyChecking=no -i key.pem server@server.com <<END
cd subfolder
END
; do ((count++)); [[ $count -eq 3 ]] && echo 'error' && break && exit 64; done;
答案 0 :(得分:1)
尝试:
() - name="rdg2" and id="Present2"
() - name="rdg2" and id="Absent2"
或者看看sftp的选项 until echo "cd subfolder" | sftp -o StrictHostKeyChecking=no -i key.pem server@server.com
。