Chapters: 1: Introduction 2: Simple example 3: Invocation 4: Finer Control 5: X-Y Plots 6: Contour Plots 7: Image Plots 8: Examples 9: Gri Commands 10: Programming 11: Environment 12: Emacs Mode 13: History 14: Installation 15: Gri Bugs 16: Test Suite 17: Gri in Press 18: Acknowledgments 19: License Indices: Concepts Commands Variables |
10.16: Interaction Between Gri and Operating System
10.16.1: Using the OS from within GriGri uses the operating system internally for things like paging through help information.
The operating system may be called within Gri commands, using a
syntax borrowed from the ` Often the dollar-parentheis syntax is used in title commands, to indicate the full pathname of the Gri commandfile, e.g.
In assignment to synonyms, expansion of dollar-parenthesis is not done.
Thus the operating system is called twice on the second line below, and
not at all on the first line; to see this, run it as `
Syntax Note Dollar-parenthesis blocks must be prefixed with
backslash to avoid confusion with math expressions within strings, for
example to avoid breaking ` Example It is a good idea to employ unix environment variables to name directories containing data, so that Gri scripts will work unchanged even if the data are moved (so long as the environment variables are altered), e.g.
Another method is to pass instructions to the operating system with the
`
Frequently used system commands are `
10.16.2: Using Gri from within the OSThis section only applies to unix systems.
Save the following into a file called `p' and then make it
executable using `
|