Wicked Cool Shell Scripts
Wicked Cool Shell Scripts :: shell script 035-mysftp.sh

Shell Script 035-mysftp.sh

#!/bin/sh

# mysftp - make sftp start up more like ftp

echo -n "User account: "
read account

if [ -z "$account" ] ; then
  exit 0;	# changed their mind, presumably
fi

if [ -z "$1" ] ; then
  echo -n "Remote host: "
  read host
  if [ -z $host ] ; then
    exit 0
  fi
else
  host=$1
fi

# echo sftp -C $account@$host

exec /usr/bin/sftp -C $account@$host

Explore The Book!
[book cover]
Table of Contents
Read Some Scripts!
Shell Script Library
Book Errata
All The Links
Read the Reviews
Talk About It
Author Bio
Buy The Book!



Other books by author Dave Taylor
Learning Unix for Mac OS X (O'Reilly & Associates)
Solaris 9 for Dummies (Wiley)
Teach Yourself Unix in 24 Hours (Sams/Macmillan)
Teach Yourself Unix System Administration in 24 Hours (Sams/Macmillan)
Creating Cool HTML 4 Web Pages (Wiley)
Ten Quick Steps to Learning Mac OS X Unix (ebook!)