sdds scripts not working in windows version

Moderators: cyao, soliday

Post Reply
ding
Posts: 53
Joined: 30 Jul 2008, 12:36

sdds scripts not working in windows version

Post by ding » 24 Mar 2010, 16:38

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

soliday
Posts: 390
Joined: 28 May 2008, 09:15

Re: sdds scripts not working in windows version

Post by soliday » 25 Mar 2010, 09:13

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.

ding
Posts: 53
Joined: 30 Jul 2008, 12:36

Re: sdds scripts not working in windows version

Post by ding » 25 Mar 2010, 12:51

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
Attachments
dump_err.jpg
the error message for the script dumpbeam
dumpbeam.txt
the script for dump beam, and I changed to .txt for uploading
(502 Bytes) Downloaded 3821 times

soliday
Posts: 390
Joined: 28 May 2008, 09:15

Re: sdds scripts not working in windows version

Post by soliday » 25 Mar 2010, 12:58

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.

ding
Posts: 53
Joined: 30 Jul 2008, 12:36

Re: sdds scripts not working in windows version

Post by ding » 25 Mar 2010, 14:57

Thanks a lot. works.

Yuantao

Post Reply