4

Why does sftp hide the log from stdout?

view full story
linux-howto

http://unix.stackexchange.com – I have a script a.sh, which has an sftp command: echo "Starting to sftp..." sftp [email protected] << END_SCRIPT ls mput *.csv.gz bye END_SCRIPT echo "Sftp successfully." If I run it interactively, the log output from sftp is shown. However, if I set it in a crontab and redirect the stdout to a file using >, there will be only the output from the two echo statements. How can I get the log from the sftp command? EDIT: I tried the following forms and it didn't work too. sftp -b batch_file.txt [email protected] ( redirect from cron ) sftp -b batch_file.txt [email protected] >> s (HowTos)