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

Home » Public Forums » archive » IDL_STARTUP trouble and .kshrc
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: IDL_STARTUP trouble and .kshrc [message #33746 is a reply to message #33675] Wed, 22 January 2003 06:40 Go to previous message
Nigel Wade is currently offline  Nigel Wade
Messages: 286
Registered: March 1998
Senior Member
dave keller wrote:

> I want to use an alternate 'IDL_STARTUP' file when running IDL from a
> scheduled ('cron') job. I used to do this all the time on Sun and HP
> workstations. But now on an IBM workstation, it seems that IDL takes
> the IDL_STARTUP variable STRICTLY FROM MY .kshrc, as if IDL reads the
> .kshrc file!
>
> From a ksh on an IBM:
>
> (assume I have files 'mystartup.pro' and 'mystartup_v2.pro')
>
> % export IDL_STARTUP='~/mystartup_v2.pro'
> % idl
> 'This is the old startup program' (message in the mystartup.pro
> file)
> IDL> print,getenv('IDL_STARTUP')
> mystartup.pro
> IDL> exit
> echo $IDL_STARTUP
> 'mystartup_v2.pro'
>
> What is also odd is that I can modify my .kshrc file, AND NOT EVEN
> 'EXECUTE' IT, and IDL will use THE IDL_STARTUP VARIABLE IN THE .kshrc
> FILE!
>
> .kshrc:
> export IDL_STARTUP='mystartup.pro' (IDL WILL USE mystartup.pro)
> export IDL_STARTUP='mystartup_v2.pro' (IDL WILL USE mystartup_v2.pro)
>
> I want to specify, 'dynamically', which IDL_STARTUP file to use, on
> this IBM system. But IDL seems to 'read' my .kshrc file, and use
> whatever the environmental variable IDL_STARTUP is, from there. IDL
> reads my .kshrc whether or not I 'execute' it, all I have to do is
> modify the .kshrc with an editor, and IDL will follow. This is not
> what I expect, I expect IDL to honor my IDL_STARTUP variable.
>
> I think ksh is the predominant shell on our system, so I'd prefer
> that, but it may be that using 'c' shell is the solution?
>
> Heeeeelp?
>
> -- Dave --

The file .kshrc is sourced every time a new ksh process starts. If the
script /path/to/idl/idl starts with #!/bin/ksh or by some other means runs
ksh then it is implicitly starting a new ksh shell which will execute your
.kshrc.

You could create yourself another idl script which uses #!/bin/sh to stop it
using ksh. Alternatively, set IDL_STARTUP in your .profile rather than your
.kshrc file so it's only done once per session.

--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
[Message index]
 
Read Message
Read Message
Previous Topic: IDLgrVolume
Next Topic: keyboard problem

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

Current Time: Wed Oct 22 08:24:05 PDT 2025

Total time taken to generate the page: 0.56115 seconds