Text Files with GhostScript

5.8 Text Files with GhostScript

Eventually you will get tired of typing commands at the gs promt. If you make a mistake doing this, for example, you will probably have to start all over again.

You have an option when you start gs to use a file as input. So if you have saved some commands in a file called square.ps, you could execute them with gs square.ps. When gs is done interpreting your file, it will return you to the gscommand prompt so you can continue your session. If you made a mistake, all you have to fix is the input file.

Even better, gs has a run command which you can use to run a file from the gs prompt. If you want to read a file called square.ps from the gs command line, you would type (square.ps) run. The parentheses around the filename act like quotes do in many programming languages - they delimit a string.

David Maxwell, who is still writing this, would like to hear your comments and suggestions. And remember, parts of this manual are based on P.J. Weingartner's work: A First Guide to PostScript.