home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
cmdpk164.zip
/
cmdpak0.inf
(
.txt
)
< prev
next >
Wrap
OS/2 Help File
|
1998-01-10
|
28KB
|
485 lines
ΓòÉΓòÉΓòÉ 1. MLRXSHL and CommandPak Reference ΓòÉΓòÉΓòÉ
Introduction
About This Online Documentation
Notices
ΓòÉΓòÉΓòÉ 2. Introduction -- Start Here ΓòÉΓòÉΓòÉ
The package you have just installed consists of two "subpackages": MLRXSHL and
CommandPak.
MLRXSHL (W) (C) 1994-97 Martin Lafaix
This is a collection of tools that improve your command-line environment.
It contains CmdShl, SDir, FileList, Query, less, df, pushd, popd, and
whence.
CommandPak (W) (C) 1997-98 Ulrich MФller
This is a collection of tools that have derived from or were designed for
MLRXSHL. It contains a default profile for MLRXSHL's CmdShl plus xcp,
xdir, xhelp, xren, ln, recurse, watchdrv, and also the install program
that you have probably just used to install this package.
Both packages are constantly improved. The two authors are in frequent contact
in order to ensure compatibility.
All tools contained work best when used together, although most of them can be
used independently also.
In order to start using MLRXSHL/CommandPak, open the CommandPak folder on your
desktop and double-click on the CmdShl icon. A CmdShl session will start,
where you can start trying out things.
We suggest reading the following chapters in this introduction before
consulting the in-depth references of the different programs in this package:
If you have not worked with the OS/2 command line before, please see the
subsection "What is the OS/2 command line?", which contains a short
introduction.
If you're interested what MLRXSHL and CommandPak will improve at your
command shell, please consult "What do MLRXSHL and CommandPak do?"
If you're curious how CmdShl and the other functions install themselves
on top of CMD.EXE, please see "How do MLRXSHL and CommandPak work?"
Please consult the OS/2 REXX Reference to learn more about the REXX
programming language.
ΓòÉΓòÉΓòÉ 2.1. What Is the OS/2 Command Line? ΓòÉΓòÉΓòÉ
When you start OS/2, by default the Workplace Shell (WPS) is started. This is
the environment you are probably more or less used to: you see little icons
that represent objects (e.g. data files, programs, printers, hard drives etc.),
which provide a fairly easy and intuitive way to make your computer do things.
This type of interface to your computer is generally called a "graphical user
interface" (GUI), because certain graphics represent certain elements and
functions of your computer. Other operating systems also provide GUIs: for
example Windows 95, the Macintosh operating system (MacOS), and Linux (the
X-Window system).
GUIs are a fairly new achievement though. Only a few years ago, the preferred
way of interacting with a computer was a command line shell, where the user
would enter certain commands known to the operating system to perform actions
on files, start programs, print documents and so on. A typical example of this
evolution can be seen with DOS, which only knows a command line, while Windows
3.x sits on top of DOS and sort of translates the graphical operations
performed by the user to the underlying operating system. Even Windows 95 still
uses DOS internally (DOS version 7.0), although Microsoft has tried to make
this not so obvious any more.
Most of today's operating systems still provide two interfaces to the user:
first, a command line shell, and second, a graphical user interface (GUI). Both
interfaces are actually implemented by a program that runs on top of the core
of the operating system, which the user normally never gets to know. For
example, with DOS, the command line shell is provided by a program called
COMMAND.COM, which is started automatically after DOS has finished booting. If
you want, you can replace COMMAND.COM with another command processor; some
shareware programs (like 4DOS) use this opportunity to install a better command
processor than COMMAND.COM. Windows 3.1 is just a GUI to DOS and could
theoretically be replaced by something else also (although no Windows programs
will run any more then).
Now in OS/2, the aforesaid translates into the following:
OS/2's GUI is, as already mentioned, called the Workplace Shell (WPS). It
a very complex and powerful conglomerate of executables and dynamic link
libraries. If you want to start a program with the WPS, most of the time
you just double-click on its respective icon, and the WPS then calls a
function in the OS/2 kernel which will start "netscape.exe".
On the other hand, the command line interface is provided by a program
called CMD.EXE in the \OS2 directory. Try opening an OS/2 window (with a
command line interface) and type "netscape"; CMD.EXE will realize that
you're trying to start "netscape.exe" (provided that it resides on your
PATH), and call just the same OS/2 kernel function which will then start
Netscape.
Obviously, the WPS and the command line are just two different ways to achieve
the same things.
Both of OS/2's interfaces (the WPS and the command line) are specified in
OS/2's CONFIG.SYS: if you want, you can prevent the WPS from booting and have
only a "command line OS/2" by removing the PMSHELL.EXE statements, which
normally start the WPS. On the other hand, you can replace CMD.EXE by another
command processor also (which, for example, the shareware packages 4OS2 and
YAOS do).
While GUIs generally have the advantage of making things more intuitive and
accessible to inexperienced users, many operations are more comfortably
performed on the command line -- once you know how to use it. Let's take an
example: Imagine you have a folder with 30 HTML files (ending in ".HTM") and
you would like to rename all of their endings to ".TXT". With the WPS you
would have to Alt-click on each one of them and type in something new. On the
command line, you could just type
ren *.htm *.txt
where "ren" stands for "rename", and the asterisk ("*") stands for "any number
of any character", so that a file "a.htm" would be renamed, as well as a file
"xyz123_blah.htm". Files ending in ".doc" or even ".htm2" however would not be
touched.
So, depending on what you want your computer to do, sometimes a command line
interface can be more flexible than a GUI.
The most important OS/2 commands are:
CD -- change directory,
DIR -- show contents of a directory,
REN -- rename a file,
DEL -- delete a file,
COPY -- copy (duplicate) a file.
Look in the "OS/2 Online Reference" that comes with OS/2 to see more (many
more...) details.
ΓòÉΓòÉΓòÉ 2.2. What Do MLRXSHL and CommandPak Do? ΓòÉΓòÉΓòÉ
While the OS/2 command line (provided by CMD.EXE) is already a lot more
flexible and comfortable compared to DOS, still a number of things could be
improved. Especially after having worked with a UNIX derivative (such as
Linux), one realizes the following:
Especially when having to type long file names, the command line editing
could be much more comfortable.
CMD.EXE cannot be customized; moreover, when using environment variables,
for each change made to CONFIG.SYS, a reboot is required.
CMD.EXE provides no self-defined commands (aliases).
One cannot redefine keys so that pushing a certain key would
automatically execute a certain function.
The provided commands for file handling (DIR, REN, COPY, MOVE) are also
not very flexible: they lack a more lucid (and configurable) display,
interactive file processing, backup options, extended attribute handling,
and so on.
CMD.EXE does not provide much support for the features of the WPS. As a
consequence, one has to use EITHER the WPS OR the command line to perform
certain operations; both do not interact very well.
Although the OS/2 command line interface does provide a "help" command,
its features are pretty limited. When working with the command line, a
one-command interface to all of OS/2's help facilities and other
documents (most importantly in HTML format) would be helpful.
MLRXSHL and CommandPak use REXX to address these problems. As opposed to other
packages (such as 4OS2), the default OS/2 CMD.EXE is NOT replaced, but
enhanced: a new command line is provided, with better editing options, aliases
(self-defined commands), key redifinitions, and more. The entered commands are
mostly passed on to the underlying CMD.EXE. In addition, a number of new
programs for use with the command line are introduced. A few of them replace
CMD.EXE's built-in commands with the use of aliases.
ΓòÉΓòÉΓòÉ 2.3. How Do MLRXSHL and CommandPak Work? ΓòÉΓòÉΓòÉ
One of the most flexible features of CMD.EXE is the ability to process REXX
programs, with which you can write pretty complex software without needing a
compiler. REXX is already included in OS/2.
Please consult the OS/2 REXX Reference to learn more about the REXX programming
language.
Now, CmdShl is simply a REXX program which is started by CMD.EXE. While it is
running, it takes input from the keyboard, checks for validity, translates
characters into user-defined commands when neccessary, and so on. This means
the editing is completely taken over by CmdShl, although it imitates CMD.EXE's
behaviour, while also offering a number of new features (such as command /
argument expansion and more).
When you press the Enter key, CmdShl evaluates your input according to the
following:
1. If your input is a CmdShl built-in command (such as "cd", "quit", "alias"
"rule" etc.), it is processed internally. "Built-in" means that the
command is implemented in CmdShl's code itself (in the file
"cmdshl.cmd").
2. If your input has been defined as an alias, CmdShl executes the commands
that were defined with it. For example, when you enter "dir", which is
defined as an alias to "xdir.cmd" in the default profile, xdir is
executed. Obviously, this way CMD.EXE's standard commands can easily be
replaced by other programs.
3. If your input seems to be a directory and the "executable directories"
function has been enabled, CmdShl changes the current directory, as if
you had entered "cd <directory>". CmdShl's impCD variable directs this
feature and its priority over regular commands; see CmdShl's reference
for details.
4. If none of the above applies, your input is passed on to CMD.EXE, which
then executes it; so when the entered command is a CMD.EXE built-in (for
example "copy"), CMD.EXE processes it directly; otherwise, CMD.EXE
searches an external program. This happens for example when you call
"watchdrv" or "pstat". If the command is not found (e.g. because you
misspelled it), CMD.EXE displays an error message. After the command has
been executed, CmdShl regains control and lets you enter a new line.
The features of MLRXSHL and CommandPak are implemented on all of these levels.
The editing features are, of course, implemented in CmdShl itself, while most
of the new commands (except for the "built-ins") reside in external files
(query.cmd, xdir.cmd, xren.cmd, ln.cmd etc.). Finally, a few aliases are
defined to replace certain CMD.EXE commands (such as "dir", "ren" etc.); since
aliases have higher priority over CMD.EXE, they can override existing
commands. For other commands that have no counterpart in standard OS/2 (like
"query" and "ln"), aliases are not neccessary, because CMD.EXE will find them
on its own (provided they reside on the PATH).
ΓòÉΓòÉΓòÉ 3. About This Online Documentation ΓòÉΓòÉΓòÉ
CommandPak's documentation is available in two ways:
The online documentation (the INF books you are now reading) was designed
to acquaint you with both MLRXSHL and CommandPak.
Each section after the Notices describes a certain part of the MLRXSHL /
CommandPak package, containing a "What's That" subsection giving an
overview of the presented tool, followed by one or more subsections
describing the installation process and the detailed usage of the tool.
Since the two provided subpackages are maintained individually by the
respective authors (Martin Lafaix and Ulrich MФller), the online
documentation has been split into several .INF files. The three files
are:
- CMDPAK0.INF -- containing everything under "Introduction -- start
here" and "Notices". This is the introductory document without any
actual reference information. It was written by Ulrich MФller, based
on MLRXSHL0.INF by Martin Lafaix, which is the introductory document
to MLRXSHL only.
- MLRXSHL.INF -- the online reference of MLRXSHL, written by Martin
Lafaix.
- CMDPAK.INF -- the online reference of CommandPak, written by Ulrich
MФller.
By double-clicking on the documentation icon in the CommandPak folder or
by typing "help ref" at the CmdShl prompt, all three files are joined and
opened together.
If you wish to alter/extend MLRXSHL and redistribute it, you can easily
extend the present structure of the online reference, provided that you
have IBM's IPFC installed, which is part of the OS/2 Toolkit. Simply take
MLRXSHL0.IPF, the IPF source file for MLRXSHL.INF, which is also shipped
in this package, add anything you wish to this introductory document, and
start with a new, fourth online document for your software. Then, open
the new documentation with "HELP
<YOURPCK>0.INF+MLRXSHL.INF+<YOURPCK>.INF", replacing <YOURPCK> with the
name of your package.
In addition, extensive help at the command line is available with the use
of the new "help" command. Just type "help" and press Enter, and you will
receive further information on how to use "help".
Please see the "The Syntax Diagrams Explained" section to learn about the
symbols used throughout this documentation.
ΓòÉΓòÉΓòÉ 3.1. The Syntax Diagrams Explained ΓòÉΓòÉΓòÉ
This online documentation uses a widely accepted format for describing the
syntax of commands at the command line. The following symbols are used both in
the INF books that you are currently reading and with the command-line "help"
command:
When only a part of a command is capitalized, you can either type the
full command or abbreviate it by only using the capitalized letters.
Example:
DEFine
means that you can either type "def" or "define". With most commands
(except CmdShl aliases), case is not important; here, you could also type
"DEF" or "DEFINE".
Text surrounded by by angle brackets (e.g. "<text>") is not supposed to
be typed in, but replaced by something meaningful that is usually
referred to in the explanation of the respective command. Example:
help <topic> search for <topic>
means that you have to replace "<topic>" with the topic that you actually
want to search for.
Everything within "[" and "]" is optional. You may use it or leave it
out. Example:
def <key> [<value>]
means that you have to type "def" with a key name; the following
definition is optional.
Alternatives within "[]" or "{}" are separated by a vertical line ("|").
When enclosed in "{}", using one of the alternatives is obligatory; when
enclosed in "[]", you CAN use one of the alternatives. Examples:
foo [-h|/?] get help
foo {-h|/?} get help
In the first example, you can type either "foo", or "foo -h", or "foo /?"
to get help; in the second example, only "foo -h" or "foo /?" would do.
Three dots ("...") specify that the preceding element may be repeated.
Example:
xdir -x[:{a|d|t|s|e|l}...]
would allow "xdir -x", "xdir -x:a", "xdir -x:asl" and so on.
Here is an another example of a typical syntax explanation:
help [sys|rex]<nr> give help on OS/2 error message number <nr>
means that you have to type "help"; optionally you can add either "sys" or
"rex". You have to specify <nr> at the end of the line, which in this case is
supposed to be a number. In this case, valid inputs would be:
help 001
help sys023
help rex040
Now, if you feel fit for syntax diagrams, type "help query" at the command
shell to see a REALLY WILD syntax explanation. I admit that Martin Lafaix'
diagram in the query reference is a bit more lucid.
ΓòÉΓòÉΓòÉ 4. Notices ΓòÉΓòÉΓòÉ
Disclaimer
Licence and Copyright
Comments and suggestions
Year 2000 compliance
Trademarks
Revision history
ΓòÉΓòÉΓòÉ 4.1. Disclaimer ΓòÉΓòÉΓòÉ
January 1998
Please read through the following sections carefully:
1. This disclaimer applies to both MLRXSHL and CommandPak:
The following paragraph does not apply to the United Kingdom or any
country where such provisions are inconsistent with local law:
THIS PUBLICATION IS PROVIDED "AS IS," INCLUDING ANY SAMPLE APPLICATION
PROGRAMS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
OR FITNESS FOR A PARTICULAR PURPOSE.
Some states do not allow disclaimer of express or implied warranties in
certain transactions, therefore, this statement may not apply to you.
2. This publication could include technical inaccuracies or typographical
errors. Changes are periodically made to the information herein; these
changes will be incorporated in new editions of the publication. Martin
Lafaix and Ulrich MФller may make improvements and/or changes in the
product(s) and/or the program(s) described in this publication at any
time.
3. Please read through the Licence and Copyright section also.
ΓòÉΓòÉΓòÉ 4.2. Licence and Copyright ΓòÉΓòÉΓòÉ
CommandPak COPYRIGHT LICENCE
The CommandPak is FREEWARE. Since most of this package is written in
REXX, you may improve, modify, add, take away anything you like without
payment to Ulrich MФller.
The CommandPak is NOT released in the public domain, however. Ulrich
MФller retains his COPYRIGHT to his parts of this package.
This licence does not necessarily cover future releases. I retain the
right to modify the licence agreement for future versions.
This licence applies to the functions of CommandPak only. The licence for
MLRXSHL is given by Martin Lafaix and included below.
(C) Copyright CommandPak Ulrich MФller, 1997-98. All Rights Reserved.
MLRXSHL COPYRIGHT LICENSE
This package contains application programs in source language, which
illustrate OS/2 programming techniques. You may copy, modify, and
distribute these application programs in any form without payment to
Martin Lafaix, for the purposes of developing, using, marketing or
distributing application programs conforming to the OS/2 application
programming interface.
(C) Copyright MLRXSHL Martin Lafaix, 1995-1997. All Rights Reserved.
If you wish to republish these packages or parts or modifications of them, we
would be happy to be notified and, more importantly, mentioned as authors.
ΓòÉΓòÉΓòÉ 4.3. Contact -- Comments and Suggestions ΓòÉΓòÉΓòÉ
Since this package consists of two "subpackages" which work together, please
contact the respective author for comments and suggestions. Type "help
<command>" to find out the author of a certain <command>.
For parts of MLRXSHL, this is:
Martin Lafaix
8, rue Berthollet
75005 Paris
France
e-mail: lafaix@ibm.net
www: http://wwwi3s.unice.fr/~lafaix/
For parts of CommandPak, this is:
Ulrich MФller
e-mail: ulrich.moeller@rz.hu-berlin.de
www: http://www2.rz.hu-berlin.de/~h0444vnd/
The above WWW addresses also carry the newest versions of MLRXSHL and
CommandPak, respectively.
ΓòÉΓòÉΓòÉ 4.4. Year 2000 Compliance ΓòÉΓòÉΓòÉ
The date-sensitive tools contained in MLRXSHL and CommandPak (namely Fl, SDir,
and xdir) are year-2000 compliant.
ΓòÉΓòÉΓòÉ 4.5. Trademarks ΓòÉΓòÉΓòÉ
The following terms are trademarks of the IBM Corporation in the United States
or other countries or both:
IBM
Object REXX
Operating System/2
OS/2
ΓòÉΓòÉΓòÉ 4.6. Revision history ΓòÉΓòÉΓòÉ
Please see the "history.cpk" file in the CommandPak directory for a joint log
of CommandPak's history.
Moreover, each program documented in this reference has a History section also.