elif [ $TYPE == "-h" ]; then
echo “ sftp_util syntax is:”
echo “ ./sftp_util.sh <GET|PUT|DEL|-h> <FileName> [-s] [-l]”
echo “ GET GET is used to retrieve a file from the remote server.”
echo “ PUT PUT is used to place a file on the remote server.”
echo “ DEL DEL is used to delete a file from the remote server.”
echo “ -h -h is used to print this help menu.”
echo “ -s -s <sftp server path of/to file, do not include a leading ‘/’ (ex. test/test2)>”
echo “ -l -l <sftp server path of/to file>”

else
echo “Please use ./sftp_util.sh -h for help”
fi

Usage goes a little something like this:

server1$> ./sftp_util.sh PUT file -s test/empty_dir -l /home/user

server2$> ./sftp_util.sh GET file -s test/empty_dir -l /here

server2$ ./sftp_util.sh DEL file -s test/empty_dir

Nothing overly fancy, just a quick little script to save me time and have a bit of fun on a slow work day.