I have an ongoing ftp upload with lftp which is backgrounded and i am wondering if there is a method to retrieve the status of the upload in a scripted way.
What i've figured out so far is a way to retrieve the status manually by attaching to the lftp session and typing 'jobs', f.eks:
lftp -c attach PID_OF_LFTP_PROCESS
then the lftp shell is prompting and i can type 'jobs'
[PID_OF_LFTP_PROCESS] Attached to terminal. lftp firstname.lastname@example.org:/> jobs
output is something like:
 mput -c /mnt/media/upload/parts/testfiles.part* '/mnt/media/upload/parts/testfiles.part10.rar' at 124930848 (61%) 105.5K/s eta:12m [Sending data]
that is the output i need, but how can i retrieve it within a script?