Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1556 |
|
Query the AIPS++ resource database.
getrc [-i] [-v] keyword
getrc fetches keyword values from the aipsrc (p) databases. The mechanism has some similarities with that of the .Xdefaults database in X-windows. getrc searches a set of aipsrc databases (listed below) in sequence to find a match for the keyword specified on the command line.
All AIPS++ resources are within the scope of getrc.
getrc returns 0 on success with the value on stdout. Otherwise, it returns a message on stderr with a non-zero status as follows
Status return values
0
: success
1
: usage error
2
: $AIPSPATH not defined
3
: $HOME not defined
4
: invalid regular expression
5
: pattern not matched
To get the default printer (Bourne shell):
PRI=`getrc printer.default 2> /dev/null`
To see where the default printer definition was found:
grus% getrc -v printer.default sw_hutt Line matched in file /aips++/sun4/epping/grus/aipsrc was printer*default: sw_hutt
The following aipsrc files are consulted in sequence, except that /.aipsrc is ignored if the -i option is specified.
~/.aipsrc $AIPSROOT/.aipsrc $AIPSHOST/aipsrc $AIPSSITE/aipsrc $AIPSARCH/aipsrc
It is not an error for any of these files to be absent or empty. Refer to the entry for aipsrc (p) for an explanation of how the aipsrc files are used.
AIPS++ variable names (§1.2).
aipsrc (p), AIPS++ resource database.
affirm (p), get the Boolean value of a set of arguments.
Original: 1992/03/05 by Mark Calabretta, ATNF.