|
problem in making sftp script
Dear all
I am bit new to shell scripting . I am implemented autossh between two sun solaris machines , so that when I use sftp it will not ask for the password.
Now I need to make shell script in which I have to transfer files from one server to another server automatically through root user. I try to make shell script for automatic transfer of files through sftp.
#! /bin/sh
sftp server1
lcd /girish
cd /amit
mput *
bye
after executing this shell script I have been put to sftp> prompt. When I exit from sftp , it give me three error lcd,cd mput command not found. It does not transfer files.
Please correct my shell script. I would be greatful for that.
|