next up previous contents
Next: 1.4.1 Obtaining a Directory Up: 1 INTRODUCTION Previous: 1.3 Experimental Software

1.4 Executing System Commands from Within IDL

You can use many system utilities from within IDL, by first typing a ``$'' before the command. Some examples are: $help (VMS)

$mail (VMS)

$copy (VMS, you will be prompted for the arguments)

$ls (UNIX)

If you are not in IDL, you may omit the ``$''.

This process is called ``spawning''. It can also be done using the IDL ``spawn'' command. Here are a VMS example and a UNIX example:

spawn,'delete netserver.log;*'

spawn,'rm netserver.log'

Certain system commands will not work from within IDL. For example, in VMS you cannot use ``set def [.subdirectory]'' to change to another directory. (See Section 1.5). Also you cannot change VMS logical names using the ``assign'' or ``define'' commands. You may use the IDL command SETLOG to do this. For example, to change your default laser printer:


$assign iue$laser1 laser   is the VMS command;

setlog,'laser','iue$laser1' is the IDL command.

 setlog,'logicalname','value'   is the general syntax of SETLOG.

On UNIX systems the process environment may be changed with the SETENV command:

setenv,'environment'   is the general syntax of SETENV.  setenv,'SHELL=/bin/sh'   is an example of its use.


 
next up previous contents
Next: 1.4.1 Obtaining a Directory Up: 1 INTRODUCTION Previous: 1.3 Experimental Software

2/9/1998