#!/bin/sh
set -x
rm commands.txt
echo "Enter the Path... example:"
echo "/oraftp/OraFin"
echo "/oraftp/OraFin/mm541"
read pth
echo "cd $pth" > commands.txt
echo "Name of the file?"
read file_name
echo "get $file_name" >> commands.txt
echo "Below are the Path and the file name you entered"
cat commands.txt
sftp -b commands.txt oraftp@10.10.10.10
#Note: This setup works only when passwordless authentication is eanbled b/w the servers.
https://libsys.kctcs.edu/stapleton/file-xfer/scripting.html
http://linuxcommand.org/wss0090.php
No comments:
Post a Comment