Welcome to iraf.net Friday, May 03 2024 @ 09:33 AM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 calling a cl command from within a C-shell script
   
RhEvans41
 05/28/2008 06:05PM (Read 6631 times)  
+----
Newbie

Status: offline


Registered: 05/28/2008
Posts: 1
I have a shell script which creates a file which I then try to get IRAF to
execute. The script used to work fine, but I have not used it in over 12
months and now I find it does not work. I am running Version 2.14 on a
Mac.The relevant part of the script is the following--------#Create iraf script to check status of keyword "reduce", which will
#exist and have a value of 1 if the files have already been run
#through this script
rm -f /tmp/reducestatus$$cat > /tmp/cl.reduce$$ << EOF
#
cd $current
hselect @objectlist "\$I,reduce" yes > /tmp/reducestatus$$
logout.
wq
EOF#Now run this script
cd $irafdir
cl < /tmp/cl.reduce$$ > /tmp/cl.logreduce$$-----Whereas before the file /tmp/reducestatus$$ would be created, it is now
not creating it. The cl.logreduce$$ file is not very informative, all it
has in it is>cat cl.logreduce
setting terminal type to xgterm... NOAO/IRAFNET PC-IRAF Revision 2.14 Fri Nov 30 15:27:05 MST 2007
This is the RELEASED version of IRAF V2.14 supporting PC systems.
Welcome to IRAF. To list the available commands, type ? or ??. To get
detailed information about a command, type `help <command>'. To run a
command or load a package, type its name. Type `bye' to exit a
package, or `logout' to get out of the CL. Type `news' to find out
what is new in the version of the system you are using. Visit https://iraf.net if you have questions or to report problems. The following commands or packages are currently defined: ace. dimsum. guiapps. mxtools. plot. system.
color. fitsutil. images. nlocal. proto. tables.
ctio. fuzzy. language. nmisc. softools. utilities.
dataio. gemini. lists. noao. spectime. vol.
dbms. gmisc. mscred. obsolete. stsdas. websvc.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> teaching >;24;80t-----Unfortunately I am stumped as to what is going on.... Any ideas what part
is now not working?

 
Profile Email
 Quote
fitz
 05/28/2008 06:05PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
In v2.14 we switched to the ECL as the default, this uses the readline interface to permit the history editing and fix the backspace problem, but has a side-effect with host scripts such as this. Specifically, if the current directory contain a login.cl file the 'stty xgterm' command is causing the problem.Try running the script *without* a login.cl file in the current directory, or to get the old CL execute using[code:1:66700a3eae]% cl -old < /tmp/cl.reduce$$ > /tmp/cl.logreduce$$[/code:1:66700a3eae]Otherwise, I wouldn't expect your script to work since the '@objectlist' would require a CL variable 'objectlist' to be present. Since you say 'relevant part of the script' I'll assume for now this is set elsewhere. Anyway, hope this helps.Cheers,
-Mike

 
Profile Email
 Quote
   
Content generated in: 0.08 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