next up previous 204
Next: Modification Elements
Up: Group Expressions
Previous: Editing of Names

Indirection Elements

An indirection element consists of an ``indirection character'' (usually ``^'' (up arrow) although this can be changed, see section [*]) followed by the name of a text file. For instance, the group expression:

      ^raw_data

would cause GRP to search for a file called raw_data.

The specified file is read to obtain further names to be added to the group. Each line in the file is processed as if it were a separate group expression, and so may contain any combination of literal names, modification elements or further indirection elements. It is thus possible to get several levels of indirection, in which a literal name is specified within a text file, which is itself specified within an indirection element contained within another text file, etc. GRP imposes a limit of 7 levels of indirection, primarily to safe-guard against ``run-away'' indirection which happens (for instance) when a file specifies itself within an indirection element.

Indirection elements are always considered to be case sensitive, even if the group has been designated case insensitive. This is because file names on certain operating systems (eg UNIX) are always considered case sensitive, and so problems would arise while accessing indirection files if GRP was to consider them case insensitive.

The file name can contain shell meta-characters (references to environment variables for instance) which will be expanded before the file is used.


next up previous 204
Next: Modification Elements
Up: Group Expressions
Previous: Editing of Names

GRP Routines for Managing Groups of Objects
Starlink User Note 150
D.S. Berry
21st October 2009
E-mail:ussc@star.rl.ac.uk

Copyright © 2009 Science and Technology Facilities Council