Help with 'curl' - file download/cutoff problem

HI all,

I am having trouble with do shell script ‘curl’ command.

Briefly, I am trying to use curl to download several text files, using http. Apparently, if the text file is too long, curl downloads a cut-off, shorter version of the file. Strangely, I only seem to have this problem when running the curl command in the midst of a script that is doing a bunch of other 'curl’s - if I run it by itself in a short script, I never seem to have a problem. Also, strangely, if I repeat the EXACT SAME curl download command in the larger script, the second curl command seems to work just fine, downloading the entire file.

Anyone have any thoughts? Perhaps this is primarily a problem with my network?

here’s an example, although the URL is probably not publically available.

set downloadURL to "" & procNo & ".txt.cap.singlets"
set curlCode to "curl " & downloadURL & " | vis"
set singletSeqs to do shell script curlCode
set singletSeqs to do shell script curlCode

thanks for any comments!

Have you tried encapsulating the download in a
“with timeout of xxx seconds”
“end timeout”