Hi,
I am trying to figure out how I can successfully SFTP a file from within a shell script. Currently we do a few things with FTP within a shell script, but we are in the process of changing this. Can someone point me to a good way that I might be able to do the same thing with SFTP? Honestly I don't know where to begin. I just thought changing my FTP script would work, but it didn't. I am including my FTP script for starters, and if anyone has any advice or tips I would really appreciate it.
Script:
ftp -n << EOF
verbose
open xxxx.xxxx.xxxx.xxxx
user userid passwd
binary
cd ..
get $var1 $var2
close
EOF
*the var1 and 2 values are set in the script. The whole chunk is embedded within a larger script.
Thanks so much,
Geek.
I am trying to figure out how I can successfully SFTP a file from within a shell script. Currently we do a few things with FTP within a shell script, but we are in the process of changing this. Can someone point me to a good way that I might be able to do the same thing with SFTP? Honestly I don't know where to begin. I just thought changing my FTP script would work, but it didn't. I am including my FTP script for starters, and if anyone has any advice or tips I would really appreciate it.
Script:
ftp -n << EOF
verbose
open xxxx.xxxx.xxxx.xxxx
user userid passwd
binary
cd ..
get $var1 $var2
close
EOF
*the var1 and 2 values are set in the script. The whole chunk is embedded within a larger script.
Thanks so much,
Geek.