Page 1 of 1

sdds scripts not working in windows version

Posted: 24 Mar 2010, 16:38
by ding
Hello Bob,

I am not sure if others have the same problem before. My colleague can not use my SDDS scripts in his windows version. Then I followed the web instructions to install the sdds toolkit and elegant at my laptop (Windows system) which went smoothly. It turned out that I also have the problems that the scripts don't work. But it is fine if I run each line in the cygwin terminal. I am sure those scritps working in my old desktop windows machine.

Do you have any ideas what I was missing?

Thanks,
Yuantao
SLAC

Re: sdds scripts not working in windows version

Posted: 25 Mar 2010, 09:13
by soliday
Can you send me an example script that doesn't work. I'll try it on my Windows computer to see what the problem is. Also send me the error message you get.

Re: sdds scripts not working in windows version

Posted: 25 Mar 2010, 12:51
by ding
hello Bob,

I attached two files with the script and error message.

It seems the command was not recognized, but I can type to use in the cygwin terminal.

thanks,
Yuantao

Re: sdds scripts not working in windows version

Posted: 25 Mar 2010, 12:58
by soliday
Well this is what I see when I open your script in xemacs:

sddsAnalyzeBeam $1 $1.tmp^M
^M
sddsprocess $1.tmp -noWarnings \^M
"-define=col,E0,pAverage 510.99906e-6 *,units=GeV" \^M
"-define=col,Ss,St 2.99792458E11 *,units=mm" \^M
"-convertUnits=col,en?,um,m,1e6" \^M
"-convertUnits=col,Sdelta,%, ,1e2"^M
^M
...

The ^M tell me that you have Windows line breaks in the file. This is what the script is seeing when it says "\r command not found". \r is a Windows line break. You can remove these by running a cygwin program called dos2unix.

Re: sdds scripts not working in windows version

Posted: 25 Mar 2010, 14:57
by ding
Thanks a lot. works.

Yuantao