Stéphane Durand
2013-07-15 08:02:55 UTC
Hi all,
I am trying to script a command in which if an instance of lftp is already running, then I would simply like to add some items in the queue, therefore I would need to execute the command attach passing as argument the PID. This works fine in manual operations, but I would like to automate it within a shell script and pass as arguments the rest of the command once attached to the proper session. i,e as following
lftp -e "attach 24164;queue mirror -c ... ...;bye"
The problem is that it returns the following
[24164] Attached to terminal.
[24164] Detaching from the terminal to complete transfers...
mirror: Not connected
[634] Moving to background to complete transfers...
The mirror instruction not being added to the queue.
Any idea to solve this issue? Any help appreciated. Many thanks.
Mvh, Cordialement, Regards,
----------------------------------------
Stéphane Durand
***@gmail.com
I am trying to script a command in which if an instance of lftp is already running, then I would simply like to add some items in the queue, therefore I would need to execute the command attach passing as argument the PID. This works fine in manual operations, but I would like to automate it within a shell script and pass as arguments the rest of the command once attached to the proper session. i,e as following
lftp -e "attach 24164;queue mirror -c ... ...;bye"
The problem is that it returns the following
[24164] Attached to terminal.
[24164] Detaching from the terminal to complete transfers...
mirror: Not connected
[634] Moving to background to complete transfers...
The mirror instruction not being added to the queue.
Any idea to solve this issue? Any help appreciated. Many thanks.
Mvh, Cordialement, Regards,
----------------------------------------
Stéphane Durand
***@gmail.com