Skip to content
Advertisement

Execute mirror and mget lftp commands in bash script

Current code

JavaScript

Objective

Download all csv files and mirror my local directory folder with the remote server, so when the code is run again it won’t download a second file.

Error received

open: *.csv: Name or service not known

Comments

From what I understood of the lftp man page I should be able to get all wildcard files by using mget instead of the standard get, provided I use -e to use external commands. I’ve run mget manually and can download the files without issue but it doesn’t seem to support the *.csv in the script.

Appreciate any feedback you can provide as to why my code won’t download the files and what I might have misunderstood from the man pages.

Advertisement

Answer

It should be like:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement