Thanks very much era!
The curl string was embedded inside a C source code and was hard coded compiled with the application (Hawkeye viewer for Amos, see
http://amos.sourceforge.net). The author has used the % signs for replacing string segments by variables with a string function. It has nothing to do with DOS I think.
For this reason the slash was in front of the " to hide it and I forgot to delete it before I posted the thread.
Hawkeye has only space for a single command line, so I decided to put everything into an external script "fetchscf.sh" as you started it already. The command line in Hawkeye is now only
/usr/local/bin/fetchscf.sh %EID% %TRACECACHE%
fetchscf.sh contains:
<source>
#!/bin/sh
EID=$1
tracecache=$2
curl "http://www.ncbi.nlm.nih.gov/Traces/trace.fcgi?cmd=retrieve&save=1&srcf=1&scfrcf=scf&file=trace&val=$EID&ti=$EID" -s -o $tracecache/$EID.tar
tar tvf $tracecache/$EID.tar | grep ' \.scf$' | cut -d: -f2 | cut -b4- | xargs tar xOf $tracecache/$EID.tar >$tracecache/$EID.scf
</source>
Because tar tvf returned the whole info line including the date etc.
-rw-rw-r-- 0/0 106207 2007-07-09 00:29 2007_07_09_01h29m40s/BACILLUS_ANTHRACIS_STR._AMES_0581/TIGR/traces/BAEAT42TR.scf
I had to cut the string from the left side until the first character of the path name.
I wasn't sure if this length was always exactly constant, but I assumed that the time was always separated by ":" and then the fourth byte is the beginning of the path name. This explains the double cut in the pipe.
Maybe this is not perfectly elegant, but it works fine. It isn't worth making it more perfect, because NCBI will change the path names and URL parameters every three month or so.
Thanks again for your help!
Thomas