Open System Services Shell and Utilities Reference Manual (G06.25+, H06.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 les of the child process.
EXAMPLES
1. Running the OSS /bin/sh le (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 le:
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<>logle
9. Preventing the TACL command interpreter from interpreting an absolute pathname as a
RUN option:
osh -- /usr/scripts/myscript
527188-003 Hewlett-Packard Company 6101