Open System Services Shell and Utilities Reference Manual (G06.29+, H06.08+, J06.03+)
User Commands (m - o) osh(1)
DESCRIPTION
The osh command executes an OSS program or shell script from the Guardian environment. osh is
a Guardian process that spawns an OSS process within the same HP node. osh allows you to
specify the environment and initial process attributes of the child process; it also allows redirec-
tion of data for the initially open files of the child process.
For the H06.23 or later H-series RVUs, or J06.12 RVUs or later J-series RVUs, or systems that
have installed SPR T8628H01_AAU, the file mode creation mask (umask) of the spawned process
is set to 0022. For the H06.25 or later H-series RVUs, or J06.14 or later J-series RVUs, or systems
that have installed SPR T8628H01_AAV or later SPRs, the file mode creation mask (umask) of the
spawned process is set using the Guardian DEFINE =OSSˆUMASK. If DEFINE =OSSˆUMASK is
not set or the value is invalid, osh uses the default value of 0022.
EXAMPLES
1. Running the OSS /bin/sh file (a Korn shell) interactively:
osh
2. Running an interactive shell script:
osh script1
3. Running a noninteractive script:
osh < script2
4. Reading this reference page:
osh -c "man osh"
5. Running the OSS shell ls command with output to an OSS file:
osh ls -a >/dirlist.txt
6. Using OSS pipes and regular expressions in a shell command (note the use of single quote
marks (apostrophes) to prevent the OSS shell from interpreting the number sign (#) char-
acter):
osh -c "grep ’#’include *.c | sort | uniq | more"
7. Using an OSS process directly without a shell:
osh -p cp ./myprog /usr/bin/myprog
8. Running a server program that has no controlling terminal:
osh -nowait -p /etc/portmap <- >- 2<>logfile
9. Preventing the TACL command interpreter from interpreting an absolute pathname as a
RUN option:
osh -- /usr/scripts/myscript
527188-021 Hewlett-Packard Company 6−103