a question about running iraf script
dhdxx wrote on Jul 03, 2009
Hi
I am a newcomer here. Nice to meet your guys.
The computer coordinator just updated the iraf in our department from iraf-2.12.2a to iraf-2.14.1. Unfortunately, there are some interesting things happening and my routines can't work.
Previously, I can run the iraf routine directly from the linux. For example, I have a small script, text.cl
print('hello')
logout
I can run it
quasar> cl < text.cl
it will output the result on the screen.
However, by now, it doesn't work. The computer will output
ecl> ERROR: use `logout' to log out of the CL
ecl> ERROR: use `logout' to log out of the CL
ecl> ERROR: use `logout' to log out of the CL
ecl> ERROR: use `logout' to log out of the CL
ecl> ERROR: use `logout' to log out of the CL
ecl> ERROR: use `logout' to log out of the CL
ecl> ERROR: use `logout' to log out of the CL
ecl> ERROR: use `logout' to log out of the CL
ecl> dongh@quasar:~/iraf$ ;36;80t
I need to log into cl first and then run the script
ecl> cl < text.cl
Could you give me some suggestions about what happens.
Thanks.
Best wishes
dhdxx
I am a newcomer here. Nice to meet your guys.
The computer coordinator just updated the iraf in our department from iraf-2.12.2a to iraf-2.14.1. Unfortunately, there are some interesting things happening and my routines can't work.
Previously, I can run the iraf routine directly from the linux. For example, I have a small script, text.cl
print('hello')
logout
I can run it
quasar> cl < text.cl
it will output the result on the screen.
However, by now, it doesn't work. The computer will output
ecl> ERROR: use `logout' to log out of the CL
ecl> ERROR: use `logout' to log out of the CL
ecl> ERROR: use `logout' to log out of the CL
ecl> ERROR: use `logout' to log out of the CL
ecl> ERROR: use `logout' to log out of the CL
ecl> ERROR: use `logout' to log out of the CL
ecl> ERROR: use `logout' to log out of the CL
ecl> ERROR: use `logout' to log out of the CL
ecl> dongh@quasar:~/iraf$ ;36;80t
I need to log into cl first and then run the script
ecl> cl < text.cl
Could you give me some suggestions about what happens.
Thanks.
Best wishes
dhdxx
Mike Fitzpatrick wrote on Jul 03, 2009
The 'cl' command is actually a C-shell startup script, if what you want is to execute a script from the host level then have a look at
http://iraf.noao.edu/iraf/web/new_stuff/cl_host.html
Alternatively, you can execute the CL binary directly as e.g.
% /iraf/iraf/bin.redhat/ecl.e < test.cl
Note that in the first case you can't rely on having a login.cl file to do any package loading or initialization, in the second case if you do it from a directory with a login.cl it will be read, however you'll lose of of the setup the 'cl' command does which may affect whether you can compile a task, or find some binaries.
If you have questions, write back with details.
-Mike
http://iraf.noao.edu/iraf/web/new_stuff/cl_host.html
Alternatively, you can execute the CL binary directly as e.g.
% /iraf/iraf/bin.redhat/ecl.e < test.cl
Note that in the first case you can't rely on having a login.cl file to do any package loading or initialization, in the second case if you do it from a directory with a login.cl it will be read, however you'll lose of of the setup the 'cl' command does which may affect whether you can compile a task, or find some binaries.
If you have questions, write back with details.
-Mike
dhdxx wrote on Jul 03, 2009
Hi Mike:
I found that the problem could be because that I use 'ecl' instead of 'cl'
It seems that 'ecl' doesn't support to run a IRAF script directly from the linux. When I change the command to 'cl < test.cl -o', it works.
Thanks for your quick response.
Best wishes!
Hui
I found that the problem could be because that I use 'ecl' instead of 'cl'
It seems that 'ecl' doesn't support to run a IRAF script directly from the linux. When I change the command to 'cl < test.cl -o', it works.
Thanks for your quick response.
Best wishes!
Hui
fitz
The 'cl' command is actually a C-shell startup script, if what you want is to execute a script from the host level then have a look at
http://iraf.noao.edu/iraf/web/new_stuff/cl_host.html
Alternatively, you can execute the CL binary directly as e.g.
% /iraf/iraf/bin.redhat/ecl.e < test.cl
Note that in the first case you can't rely on having a login.cl file to do any package loading or initialization, in the second case if you do it from a directory with a login.cl it will be read, however you'll lose of of the setup the 'cl' command does which may affect whether you can compile a task, or find some binaries.
If you have questions, write back with details.
-Mike
Last post on Jul 03, 2009