Can lftp get take in a variable name?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I want to have a script that uses lftp to download a zip file with a variable name. Currently I have the following:
open server
user user pass
set ssl:verify-certificate no
ls -ltA1 | grep .zip$ | head -n 1
Executing this along side lsftp -f
returns just the file name I need. Theoretically now I would run
file="$(lftp -f get_minecraft_list)"
lftp -u user:pass server:21 -e "get $file; bye"
and it should work right? When doing this the lftp command ends up in a reconnect loop. So I tried to do the variable name thing in the first block of code but have no idea how to set the output of that ls
command to work with the get
command. Any ideas?
bash variable lftp
add a comment |Â
up vote
0
down vote
favorite
I want to have a script that uses lftp to download a zip file with a variable name. Currently I have the following:
open server
user user pass
set ssl:verify-certificate no
ls -ltA1 | grep .zip$ | head -n 1
Executing this along side lsftp -f
returns just the file name I need. Theoretically now I would run
file="$(lftp -f get_minecraft_list)"
lftp -u user:pass server:21 -e "get $file; bye"
and it should work right? When doing this the lftp command ends up in a reconnect loop. So I tried to do the variable name thing in the first block of code but have no idea how to set the output of that ls
command to work with the get
command. Any ideas?
bash variable lftp
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I want to have a script that uses lftp to download a zip file with a variable name. Currently I have the following:
open server
user user pass
set ssl:verify-certificate no
ls -ltA1 | grep .zip$ | head -n 1
Executing this along side lsftp -f
returns just the file name I need. Theoretically now I would run
file="$(lftp -f get_minecraft_list)"
lftp -u user:pass server:21 -e "get $file; bye"
and it should work right? When doing this the lftp command ends up in a reconnect loop. So I tried to do the variable name thing in the first block of code but have no idea how to set the output of that ls
command to work with the get
command. Any ideas?
bash variable lftp
I want to have a script that uses lftp to download a zip file with a variable name. Currently I have the following:
open server
user user pass
set ssl:verify-certificate no
ls -ltA1 | grep .zip$ | head -n 1
Executing this along side lsftp -f
returns just the file name I need. Theoretically now I would run
file="$(lftp -f get_minecraft_list)"
lftp -u user:pass server:21 -e "get $file; bye"
and it should work right? When doing this the lftp command ends up in a reconnect loop. So I tried to do the variable name thing in the first block of code but have no idea how to set the output of that ls
command to work with the get
command. Any ideas?
bash variable lftp
bash variable lftp
asked 2 mins ago
Andrei S.
143
143
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f478986%2fcan-lftp-get-take-in-a-variable-name%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password