[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Sand 1, D-72076 Tübingen, Germany
[Uni logo]


exec Source code in cafe_exec.pro

exec

Name
           exec
Purpose
           executes commands defined in file.
Category
           cafe
SYNTAX:
           exec, filename[:group],[p1,...,p9][/interactive][,/single][,/silent]
Input Parameters
           filename    - File to read commands from.
                         The commands in this (ascii) file follow the
                         syntax as on command line:
                          - Comments start with ";" in first column.
                          - IDL commands start with "!".
                          - Batch execution (i.e. read commands from
                            file) is given with the file name preceeded
                            with "@".
                            Parameters may be given by appending a
                            comma separated expression list. Within
                            the batch file the parameters may be
                            accessed as p1..p9 (s.b.).
Example
                              > @fitall,2,3
                              -> sets within "fitall" the variable
                                 "p1" at 2 and "p2" at 3.
                          - Commands starting with "#" are not
                            echoed.
                          - Expressions in strings between "%" are
                            evaluated:
                            > chgrp,%2+2%
                            -> chgrp, 4
                         If single mode (s.b.) is selected the
                         filename is interpreted as a cafe command
                         string.
           group       - Group to change to during execution.
           p1..p9      - (optional) Parameters which may be used when
                         calling the exec command. These parameters
                         may be referenced in a script.
OPTIONS:
           interactive - Read commands from currently opened command
                         file. If no command file was opened read
                         from standard input (this is the top level
                         loop).
                         Using this option opens a new processing
                         scope with local IDL variables.
Example
                         > exec,/interactive
                         > !u = 5
                         > !print, u
                         -> 5
                         > quit
                         > !print,u
                         -> variable not found
           single      - interprete the input file as a single
                         command line to be executed.
           silent      - Do not echo script commands.
           fullbatch   - Report each line of a batch file. Default is
                         that only executable lines of batch file are
                         shown (this allows easy logging)
SETUP:
           noshell     - Do not run external commands (i.e. commands
                         which do not belong to the CAFE command set)
                         in a separate shell (UNIX only).
           sh          - Use the bourne shell when spawning external
                         commands.
           autoplot    - Plot after each command.
           idle        - Process widget events when no command is
                         entered. This setup replaces the need of the
                         IDLE command.
                         It also allows to run wplot and command line
                         in parallel (!).
                         Internally it affects the caferead procedure
                         which uses the readline routine. Setting
                         this keyword may cause problems of the
                         command line editing facility in some
                         circumstances, thus use this keyword with
                         care.
Side Effects
           Changes the environment according the commands executed.
REMARK:
           The exec-command can be abbreviated with "@" (s.a.).
Example
           > exec, startup.cmd
Revision History
           $Id: cafe_exec.pro,v 1.33 2004/06/01 07:19:32 goehler Exp $

Last modified by pro2html on 2005 January 04 at 16:03 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically