0

Screenshot of code executing

I'm wondering why my code is not working. It connects via SFTP, however no files are transferred, no feedback is given on the second half of code, and no errors are presented.

#!/bin/bash
export username=xxx
export password=xxx
export url=xxx
export port=2222
export path=//wp-content/uploads/2021/01/TEST
wget ftp://$username:$password@$url:$port/* -P $path

lcd volume1/IT_Services/TEST
cd volume1/wp-content/uploads/2021/01/TEST
ls -1 volume1/wp-content/uploads/2021/01/TEST
binary
put TEST.txt
bye

Output:

Resolving xxx... 00.000.00.00
Connecting to xxx|00.000.00.00|:2222... connected.
Cyrus
  • 84,225
  • 14
  • 89
  • 153

0 Answers0