Re: Multiple journal files on linux [message #31106] |
Fri, 14 June 2002 04:56  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Mark McGrath (markmcg4@hotmail.com) writes:
> Is there a way of creating a different journal file for each IDL
> session that I start?
Here is a program called Journal_Unique. Make this the startup
file for your IDL session. You will have a different journal
file for each IDL session that you start.
**********************************************************
PRO Journal_Unique
Journal, String('journal_', Bin_Date(SysTime()), '.pro', $
Format='(A, I4, 5I2.2, A)')
END
**********************************************************
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: Multiple journal files on linux [message #31217 is a reply to message #31106] |
Wed, 19 June 2002 01:37  |
markmcg4
Messages: 5 Registered: December 2001
|
Junior Member |
|
|
Thanks David, that is almost what I was looking for.
This routine makes an `almost' unique file. An example:
Running IDL on a linux cluster, as we do here, if the machine clocks
are a litle out of sync it would be possible to over write the file
that had been opened already, no? (Not much info lost there though,
but the more serious case of the clocks being a lot out of sync then
large amounts of info in the journal file could be lost.)
I have hunted about a bit and come across this:
Add it to .cshrc/.tcshrc or equiv:
alias idl '( set rf=`mktemp /tmp/idlmg.XXXXXX` ; echo
journal,\"`mktemp ~/idl/j
ournals/journal.XXXXXX`\" >> $rf ; /usr/local/bin/idl $rf ; rm -f $rf
)'
which is an alias for the IDL comand. The mktemp program gaurentees
that the file is unique. My problem with this method is that IDLWAVE
does not pick the alias. Any ideas, anyone?
Sl�n, Mark.
>> Is there a way of creating a different journal file for each IDL
>> session that I start?
>
> Here is a program called Journal_Unique. Make this the startup
> file for your IDL session. You will have a different journal
> file for each IDL session that you start.
>
> **********************************************************
> PRO Journal_Unique
> Journal, String('journal_', Bin_Date(SysTime()), '.pro', $
> Format='(A, I4, 5I2.2, A)')
> END
> **********************************************************
>
> Cheers,
>
> David
|
|
|