So my Script looks something like this:#...files=$(find $line/processed/* 2>/dev/null) #2>/dev/null used for error output suppressionif [[ ! -z $files ]]then                    #put_list=put                    #for word in $files; do                    #       put_list=$put_list$' '$word                    #done                    put_list=put $files                     rm_list=rm $filesyafc ftp://blabla@192.168.178.54  <<**$put_listclosequit**#...So if I use it like that I get an error from yafc like this:...yafc 192.168.178.54:~/> No such command '/mnt/dir/processed/19,11,2014-14,17,25,,313', try 'help'yafc 192.168.178.54:~/> No such command '/mnt/dir/processed/19,11,2014-14,17,41,,649...Every file is listed here. Only the first file in $files was put right on the host.But if I use this: (what is commented out in the code above)put_list=putfor word in $files; do     put_list=$put_list$' '$worddoneEverything works perfect!So what is the difference? I tried to use tr to get rid of '\n'. If I echo $put_list, in both cases they (seem) to be identical. I don't want to iterate over $files because sometimes there are a lot of data in it, and it would take a lot of time.So is it possible to do this job without this costly for-loop?
Sh Script using ftp to put a list of files
shell;shell script;ftp