Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous
Next: Appendix B - Example Data Files Up: NOTE 195 Getting Started with Glish for AIPS++ Previous: What now?

Appendix A - Glish Environment

Glish can be most easily run by setting up the AIPS++ environment. For information on how to do this, see Getting Started in AIPS++.

Glish, itself, reads an environment file, called .glishrc, which may be used to set a number of system variables. The most important one is system.path.include, which specifies the directories to be searched for ``.g'' files that are loaded with the include statement. Any ``.g'' file may be loaded by giving its full path name, but the system.path.include assignment saves a lot of typing. The contents of a .glishrc file might look like

print 'reading /hyades1/rfisher/Pulsars/P1823/.glishrc'
 
system.path.include := 
    ". /gbt3/aips++/sun4sol/libexec /aips2/glishScripts-2509a /";
 
print 'system.path.include: '
for (i in 1:len(system.path.include))
    print '    path', i, system.path.include [i];

The print statements are just embellishments to remind you of where the environment variables are coming from when glish starts up. Notice the '.' path name as well as the system glish directories.

When glish starts up it reads the .glishrc file in the system glish directory. It then looks for a .glishrc file in your current directory. If none is found there, it tries your home directory. Note that the system.path.include assignment shown above will override the one in the system .glishrc file. If you just want to add additional paths, you can use the following construct to expand the string array:

system.path.include[len(system.path.include) + 1] := '/home/rfisher'

Arrays are automatically expanded in an assignment statement when the index of the assigned array is greater than its current size. ``len()'' is another name for the length() function.

Finally, it's worth a look at the UNIX script that starts the glish/AIPS++ combination. This script is the command given at the beginning of this document, for example, ``aips++''. To find out where this script is, use the UNIX 'which' command. Then list the file using the full path name.

$ which aips++
/aips++/stable/sun4sol_gnu/bin/aips++
$ more /aips++/stable/sun4sol_gnu/bin/aips++
[ lines setting up the aips++ environment variables deleted ]
exec $BINDIR/glish -l $LIBDIR/aips++path.g -l $LIBDIR/aips++.g

The last line executed in this script is the command that starts glish. It automatically includes two files, aips++path.g and aips++.g. Both files contains glish code which loads the aips++ clients. The ``-l'' (minus ell) flag tells glish to keep running in interactive mode. Without this flag the script aips++.g would be executed and then glish would terminate.

If you want to start glish without any of the AIPS++ functions or clients, just issue the UNIX command

$ glish


next up previous
Next: Appendix B - Example Data Files Up: NOTE 195 Getting Started with Glish for AIPS++ Previous: What now?
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15