psh(1)
NAME
psh − POSTSCRIPT/NeWS shell
SYNOPSIS
psh [ −display display ] [ −i ] [ −s string ] [ { − | file } ...]
DESCRIPTION
If a file argument is specified, psh opens a connection to the X11/NeWS server and sends the specified file to the server. If no file argument is specified, or if ‘−’ is specified, psh opens a connection to the server and sends stdin to the server. Any output from the server is copied to stdout. The files should be POSTSCRIPT/NeWS programs for the server to execute.
A common use of psh is to run applications written entirely in the POSTSCRIPT/NeWS language. First, type the POSTSCRIPT/NeWS program into a file. Then, add this as the first two lines: #! /bin/sh
psh "$@" << ’%EOF’ and this as its last line: %EOF This turns the script into a "Here" document. See the Input/Output section of sh(1) for details. The ‘$@’ passes the command line arguments to psh. Note that only psh options are supported. There is no mechanism for passing command line arguments to the script itself.
The file can then be made executable (with chmod(1)), invoked by name from a command shell, and UNIX will use psh to execute it. psh will in turn send your program to the X11/NeWS server.
OPTIONS
−display display
Specify the name of the display to connect to. Overrides the DISPLAY environment variable.
−i This option indicates an interactive session. If the PSHRC environment variable is set (path to a file), psh tries to send the contents of the file to the server. If PSHRC is not set or psh cannot open the file, then if a .pshrc file exists in the users home directory, psh tries to send the contents of the .pshrc to the server. If psh cannot find or cannot open a .pshrc file, psh sends the contents of the $OPENWINHOME/lib/pshrc file, where $OPENWINHOME indicates the directory where OpenWindows has been installed.
−s string
This option allows the user to send a POSTSCRIPT program to the server as a string on the command line. The string should be enclosed in appropriate quotes if it contains characters significant to the user’s shell.
SEE ALSO
sh(1)
NeWS 3.0.1 Programmer’s Guide.
TRADEMARK
POSTSCRIPT is a registered trademark of Adobe Systems Inc.
LIMITATIONS
If #! /usr/openwin/bin/psh is the first line in a POSTSCRIPT/NeWS script, as in command shell scripts, the script is installation dependent.
The following limitations apply to POSTSCRIPT/NeWS scripts which use the "Here" mechanism described above:
If the ‘−s string’ option is passed as command line argument only the code in the string will be executed.
Command line arguments cannot be passed to the script itself. Only psh options are supported.
The script cannot be executed by typing ‘psh file’.
SunOS 5.1 — Last change: 24 March 1992