#!/bin/ash count=1 while read line; do ftpget -u $user -p $password $myip \"$count.mov\" \"$line\"; count=$ done < list.txtOf course $user, $password and $myip has actual values in the real code. The syntax for ftpget is: ftpget [options] remote-host local-file remote-file And the reason I enclose the local-file and remote-file with (")'s, is because the files I'm retrieving has spaces in them. The problem is: although the script does what it's supposed to if I only enclose once
Quote
ftpget -u $user -p $password $myip \"$count.mov\"; count=$
Quote
ftpget -u $user -p $password $myip "94.mov" "Somename/00.18"Conclusion/61025_18_01_SC11_outro.mov
And here's an example line of the text file used to be read from (list.txt):
Quote
Somename/00\.18\.Conclusion/61025\_18\_01\_SC11\_outro\.mov
Help please :P
Edit: this forum still has a huge problem with editing -.-
When I edit a post, all newlines are removed. I have enabled ALL javascript...
I remember this was a problem on this forum about 2 years ago, lol.
Edit2: solved. Was the text file which had ^M's only visible in ******* Unix at the end of the file... And I can't automatically get rid of them as explained in various tutorials due to errors (missing packages blabla), so I gotta manually remove them. Thank you God for ******* up this motherfucking supposed-to-be-easiest-computer-task-in-the-world.
Edit3: not solved after all. The echo'd result (changing code to "echo ftpget ..." instead of just "ftpget") is correct, and if I manually copy it it is correct and the file will be downloaded. When I remove "echo", I get the default-syntax-output from ftpget again, and no connectivity with the FTP server.
WTF IS THIS!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?
Edit4: **** it. I did the manual work and downloaded each file individually. I'll rather **** Gates in the ass everyday by using a cracked version of Windows (as in free) than ever touching a ******* linux util again. (PS: for the FBI, SOPA-bastards, etc, I'm technically on a legit copy of Windows that came with the PC - I'm just making a point)
Edited by Mentalbox, 02 February 2012 - 07:55 AM.


Sign In
Create Account


Back to top









