Welcome to iraf.net Wednesday, May 01 2024 @ 08:18 AM GMT


 Forum Index > Help Desk > Applications New Topic Post Reply
 make the cl not complain about files existing?
   
sirmarcos
 02/07/2006 01:39AM (Read 3802 times)  
++---
Junior

Status: offline


Registered: 12/05/2005
Posts: 32
Hello,So, I write a wide range of iraf cl scripts and one thing I often do is use hselect to create file lists. So something like:[code:1:1a2b708aa5]hselect *.fits $I, expr="imagetyp == 'object'" > object_list
[/code:1:1a2b708aa5]
However, if I ever run the script again, the cl whines that it can't write to the file object_list, because it already exists.Any way to make the darn CL just overwrite on a > like any unix script would? Perhaps some other character other than >... or whatever? I know in tcsh there's some noclobber variable that has to be set to [i:1a2b708aa5]prevent[/i:1a2b708aa5] overwriting... perhaps there's some analogous clobber variable in IRAF? Marcos

The re-born Mac IRAF web site: http://macsingularity.org
 
Profile Email Website
 Quote
fitz
 02/07/2006 01:39AM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Just set the 'clobber' CL variable, e.g.cl> show clobber
no
cl> type hlib$motd > foobar
cl> type hlib$motd > foobar
ERROR: cannot open `foobar' for writing
cl> reset clobber = yes
cl> type hlib$motd > foobarThere is an analogous 'imclobber' var. Use both with care.-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