Welcome to iraf.net Monday, May 13 2024 @ 06:49 AM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 error running cl batch mode
   
IvanRamirez
 10/09/2007 02:04PM (Read 3062 times)  
+----
Newbie

Status: offline


Registered: 09/16/2007
Posts: 12
I have a .cl pipeline for data reduction (let's call it x.cl) that works fine if I enter iraf ($cl) and then type cl < x.cl. Problem is, when I try to do that from the shell ($cl < x.cl) it seems to work but after a while these things start to appear:
ecl> ecl> ecl> ecl> ecl> ecl> ecl>
along with lots of "dir" commands (I don't see the command called but I see the contents of the folder I'm working on many times) and then at some point it crashes:...
print (s1)
(list3,s3) != EOF){
^
>>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> ecl> **: }
^
ERROR: syntax error
ecl> ecl> ecl> ecl> ecl> ecl> ecl> ecl> ecl> ecl> ecl> ecl> ecl> ecl> ecl> >>> >... it continues with lots more error messages.I'm running this in a Ubuntu installation but I have tested this code in Unix and another Linux computer (RedHat I think), both work OK within IRAF and from the shell. In this Ubuntu computer the weird thing is that the code works fine if I login to IRAF first and then run cl < x.cl from it but crashes if called from the shell. Anybody has any idea what's going on? Oh and the reason why I ask this even though I can make it work within IRAF is because I really need to run this from the shell.

 
Profile Email Website
 Quote
fitz
 10/09/2007 02:04PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
It's hard to comment specifically without seeing the x.cl file itself, is it a procedure script or just a list of commands? Your code snippet is obviously missing the beginning of an 'if' statement but I can't tell whether that's related.When you login to the CL and use "cl < x.cl" you retain whatever environment you have (i.e. the loaded packages, what's defined in your login.cl, etc) and simply invoke a new CL interpreter to take input from the file. From the shell however the 'cl' command is the one used to start the system and not simply a new command interpreter. If there is no login.cl in the current working directory then the required packages may not be loaded, no uparm directory will be defined, etc. Without a uparm it may be that your script is prompting for a value but since the commands are being redirected that prompt will be answered by the next command line in the x.cl file itself.If you need to run this from the shell I'd suggest having a look at http://iraf.noao.edu/iraf/web/new_stuff/cl_host.html for more information. Otherwise if you still have problems please post or email me the x.cl file you're trying to use.Cheers,
-Mike

 
Profile Email
 Quote
IvanRamirez
 10/09/2007 02:04PM  
+----
Newbie

Status: offline


Registered: 09/16/2007
Posts: 12
Hi Mike,Thanks for your help. I "fixed" this problem "brute-force" mode. I created another .cl file called "callx.cl" with this content:cl < x.cl
logoutThe I type at the shell $cl < callx.cl and the x.cl script runs fine, as it does when I log into IRAF first. Maybe I need to do something with my IRAF installation (or my csh/bash defaults, I have no idea) such that $cl < x.cl would work? Anyway, I'm sending you (private message) the x.cl code but I'm sure there's nothing wrong with it. I'm also sending you my login file.Thanks again and please let me know if this can be done without my dirty trick Smile-Ivan

 
Profile Email Website
 Quote
   
Content generated in: 0.10 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login