comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » close journal file read-only
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: close journal file read-only [message #79130 is a reply to message #79034] Wed, 01 February 2012 05:20 Go to previous message
bstecklu is currently offline  bstecklu
Messages: 14
Registered: February 2012
Junior Member
On Jan 23, 9:57 pm, Bringfried Stecklum <steck...@tls-tautenburg.de>
wrote:
> I guess many of us log their IDL session to keep track of the work. My question
> is whether it is possible to close the log file and make itread-onlyfrom
> within IDL? Thejournalcommand lacks a corresponding option. I just want to
> avoid that the file is being deleted/changed later on by accident.
>
> If this cannot be done by IDL itself, I have to come up with a cronjob that
> checks the log folder for closed files which are still writable, and changes
> their attribute.
>
> Regards, Bringfried

Well, although the interest in the question was not particularly
overwhelming,
below is my IDL exit procedure which answers the question

; close journal, make it read-only, and exit
pro myexit
; get file name for journal unit
help,/files,!journal,out=out
; omit IDL string treatment
spawn,'echo '+out[1]+"| awk '{printf $8}'",file
ans="N"
read,"Really close journal and exit? y/N ",ans
if (ans eq "y") or (ans eq "Y") then begin
journal
file_chmod,file,a_write=0
exit
end
end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ANOVA statistical analysis with IDL
Next Topic: Re: Read data as array structure

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 21:07:35 PDT 2025

Total time taken to generate the page: 1.20208 seconds