Introducing the MPE/iX Shell and Utilities [ COMMUNICATOR 3000 MPE MPE/iX RELEASE 4.5 ] MPE/iX Communicators
COMMUNICATOR 3000 MPE MPE/iX RELEASE 4.5
Introducing the MPE/iX Shell and Utilities
by Daren Connor
Commercial Systems Division
PRODUCT OVERVIEW
A new product called the MPE/iX Shell and Utilities is now available and
is included as part of the Fundamental Operating System (FOS). This new
product is a command interpreter with an integrated collection of over
100 utilities and commands that comply with the POSIX (Portable Operating
System Interface) standard. Also included are several tools that are not
part of the POSIX standard, which facilitate use of the product on MPE/iX
in particular. This product provides an environment that encourages both
productivity and portability and is particularly useful for development
of open applications using the MPE/iX Developer's Kit (p/n 36430A).
The MPE/iX Shell is similar to, and is based upon, the UNIX Korn shell, a
powerful, widely used environment in the UNIX community. Like any
command interpreter (such as CI.PUB.SYS), the MPE/iX Shell interactively
interprets and responds to a user's command line. The shell can also be
used as a programming language. That is, it allows you to put commands
into a file and then execute that file as a program. These are known as
shell scripts and are used extensively by UNIX system users.
TOOLS PROVIDED
Here are some of the tools included in the MPE/iX Shell and Utilities:
o awk - A powerful facility that can perform many different
operations on files based on specified selection
and reporting options. For example, to display every record
in the file "file" that contains the string 'abc',
you would execute the following from within the MPE/iX Shell:
awk '/abc/ {print}' file
o lex/yacc - Tools to create lexical analyzers and parsers.
These are often used for compiler and user interface
construction.
o make - A utility to help manage a collection of interdependent
files, typically for a program built from several
separate object modules, each of which depends on its
own source file. It allows specification of dependencies
between files and automatically updates those which are
now out of date compared to their dependent files.
o rcs - Simplifies the task of keeping track of changes to
files over a period of time. It facilitates creating
multiple versions of the same file, locking of particular
versions, and many other operations.
o vi - The standard UNIX text file editor.
The MPE/iX Shell then provides an integrated environment for the various
tools to work together in a more productive manner. One example of this
is the ability to couple the output of one tool to another conveniently
through the use of the pipe facility built in to the shell. For example,
the following demonstrates coupling two tools together, grep and wc, to
determine the number of lines containing the string "foo" in the file
"file":
grep foo file | wc
COMPARING MPE/iX CI COMMANDS TO THE MPE/iX SHELL
Here is a list of several MPE/iX CI commands and the corresponding
logical equivalent within the shell:
MPE/iX CI Command/Feature MPE/iX Shell Equivalent
------------------------ -----------------------
CHDIR cd
DATE showtime
COPY cp
LISTREDO history
LISTFILE ls
HELP man
PRINT more
RENAME mv
PURGE rm -i
UDCs, Command Files Shell functions, aliases and shell scripts
For the sake of comparison, here is the output of LISTFILE within the CI
and ls within the MPE/iX Shell:
CI.PUB.SYS:
-----------
:listfile a@,2
ACCOUNT= SYS GROUP= PUB
FILENAME CODE ------------LOGICAL RECORD----------- ----SPACE----
SIZE TYP EOF LIMIT R/B SECTORS #X MX
ACCTJOBS 32B FA 1 1 1 16 1 1
ADVWCATL MGCAT 128W FB 23 23 1 32 1 1
ADVWCONV PROG 128W FB 1124 1124 1 1136 1 1
MPE/iX Shell:
-------------
shell/iX> ls -l A*
-rwxr-xr-x 1 MANAGER.SYS SYS 32 Sep 8 17:18 ACCTJOBS
-rwxr-xr-x 1 MANAGER.SYS SYS 5888 Sep 8 17:37 ADVWCATL
-rwxr-xr-x 1 MANAGER.SYS SYS 288000 Sep 8 17:44 ADVWCONV
HPXUDC.PUB.SYS
MPE/iX Release 4.5 includes a file containing simple UDCs that are
designed to make the transition to the various POSIX feature supported on
MPE easier. If you have catalogued this file, you may use the UDC "sh"
to invoke the shell with the proper options and environment. The UDC
file is called HPXUDC.PUB.SYS.
ADDITIONAL INFORMATION
This product comes with both a two-volume reference manual and a user's
guide. If you are already familiar with the KORN shell and the UNIX way
of doing things (for example, hierarchical directories), you can probably
start to use the MPE/iX Shell and Utilities software immediately after
installation and just refer to the MPE/iX Shell and Utilities Reference
Manual (36431-600001) as necessary (you may want to read carefully the
section titled "MPE/iX Implementation Considerations"). The MPE/iX Shell
and Utilities User's Guide (36431-90002) introduces you to the various
components of the product through a series of tutorials and guides,
without an excessive amount of detail for a new user. The documentation
is very thorough and of great value in making use of the shell.
Trademarks
UNIX is a registered trademark of UNIX Systems Laboratories Inc. in the
USA and other countries.
MPE/iX Communicators