NBash
24 строки · 331.0 Байт
1#!/bin/bash
2
3# ftp: test.rebex.net
4# username: demo
5# password: password
6
7echo -n "User account: "8read -r account9
10if [ -z "$account" ] ; then11exit 012fi
13
14if [ -z "$1" ] ; then15echo -n "Remote host: "16read -r host17if [ -z "$host" ] ; then18exit 019fi20else
21host=$122fi
23
24exec sftp -C "$account"@"$host"25
26