[ < < < Home ] [ < < Reference Start ] [ < Reference Contents ]
[ < Previous=Common Features ] [ Next=Common Options > ]

Intelligence Services

Options Introduction

Options for PentaTextTools allow them to operate in ways other
than standard or default ways so that processing features or
ways of accepting input or providing output can be customised.

This altered program behaviour can be made, by options, to
correspond more closely to what a user expects.

For speed and ease of use for intermediate to advanced users
these programs are purposely designed to use command line
options.

Command line options have been a standard way of changing
program activities for programs that employ a

	Command Line Interface or CLI

like PentaTextTools.

Option Lists:

Options can be listed by giving a Text Tool in PentaTextTools a line
like

	NLX -a

to show All options menus or

	NLX -tS

to show options by the Sequence (the order that options are
covered in this document's Options reference sections) or

	NLX -tI

that will show Options mostly by Input or Output purpose.

An option list shows the name of the program first, followed
by "OPTIONS".

Then a line shows the type of options being displayed:

	By Menu
or
	By Sequence
or
	By Input/Output

KEY line

A line at the start of an options list looks like

	OPTION [+]Description.[++] (Option Value)

It gives a KEY to what the option lines mean.

Each option line begins with a string like

	-a

that shows the special option character "-" followed by a one or
two letter option like "a" or "jc".  If the KEY string is
followed by

	<d>

then the option string needs to have other data after the string
or a "-" character to turn off the option if already on.  So an
option KEY followed by "<d>" like

	-X<d>

means that when using option "X" that it needs to have data after
it like

	-X"*.exe"

or to be turned off by using a "-" after "-X"

	-X-

The next item on the KEY header line

	OPTION [+]Description.[++] (Option Value)

	       ^^^
is

	"[+]"

A "+" symbol on an option line shows if an option has already
been turned on when the option list is viewed.  The option list
can be viewed at any part of the command line.  It will show "+"
if default options are turned on for a Text Tool given by
setting the ENVIRONMENT variable of <PROGRAM>_OPTIONS too.

The "+" is shown hi-lighted if viewed on the screen, to give
extra emphasis to the option being set.

If an option is not turned-on the "+" does not show up.

After this comes

	"Description."

An option list description is a phrase that explains what the
option does in just a few words.

It gives a brief explanation of what the option does followed
by a period "."

So an option line like

	-X<d>     eXclude files list.

has a description of

	"eXclude files list."

When viewed on the screen the "X" in the description is usually
high lighted to show what the option symbol signifies in the
description.

The next item on the KEY header line of

	OPTION [+]Description.[++] (Option Value)

			      ^^^^

is

	"[++]"

If the option uses attached data "<d>" a "++" string indicates
this option will accept a comma or semi-colon separated list of
<d> values.

eg

	-X*.exe;*.com;*.dll

will make the attached data "<d>" for option "-X" become the
string

	"*.exe;*.com;*.dll"

that can be used for eXcluding *.exe;*.com;*.dll files as data.

(When using commas or semicolons for option or other command line
data, You may need to enclose them in double quotes " because some
programs or batch file operations will remove them if unquoted.)

Lastly comes an

	(Option Value)

that shows any option attached data value, either by default or
by the option being turned on.  It is shown in between
parentheses.

Some options have a definite significant minimum or maximum
number that is used as a default value.  The OptionValue is only
shown if an option uses attached data "<d>".

Option Menus:

Menus exist for showing options.  Menus are like those for

	File, View, Help

To see options by menus give a command line like

	NLX -a

to the DOS shell and a categorised list of options by menus will
be given on the screen or to standard output.

Menu Option Descriptions

File Options

File Options are mostly for specifying different types of file
access such as recursive descent into subdirectories or access
to hidden files.  These options mostly deal with the INPUT side
of a Text Tool.

Other file options include those for data logging of standard
output or error/warning messages, network access waiting,
interactive selection of files to process, automatic selection
or rejection of files of different types such as text and
non-text files, and filters for preparing data for use by a
Text Tool.

View Options

View Options specify different formats that aid the appearance
or content of data output.

Some of these options affect a Text Tool in different areas.

Example:

Option "-jT<d>" allows the user to specify what character bytes
are text characters, to be regarded as text.

This can be used to expand or contract the bytes in a text range
so that International Byte Characters can be used in languages
other than English.

Or it can be used to reduce the display to the screen so that
mostly sequences of TEXT characters are shown.

Or it can help specify and select the types of files that are
accessed by a Text Tool so that only text files are chosen to be
processed if they only contain characters given by option
-jT<d>.

(Option -jT<d> is covered in the section on Common Options.)

Help Options

Help Options show the options available for listing options
in various ways such as by

	Menu

or

	Input/Processing/Output

or

	Sequence (the way options are listed in this document)

Options Syntax:

Options start with a MINUS character '-' followed by one or
more unique option identifier strings.

Option identifier strings are single letters, like 'h' of
the option string "-h", or 'tk' of the string "-tk".

These options signify something special a program is supposed
to do, or not do.

Options can be continuous in a group, like -abc for options -a
and -b and -c.

Options with attached option data <d>, like

	-zname

or

	-z name

must be at the END of a continuous options group like

	-abczname

or

	-abcz name

used in place of the longer option strings of

	-a -b -c -zname

or

	-a -b -c -z name

Note:

The symbol "<d>" in this document means that there is attached
data represented by "d".  The "<" and ">" should NOT be included
in the attached data.  (They have special significance to the
DOS shell.)  The same applies to similar symbols like "<file>".

Cancel an Option:

To CANCEL an option, put a '-' after it (e.g. "-i-" ).

To CANCEL options with attached option data <d>, the same
applies.

Starting an Option with "-"

To have attached option data <d> be a single MINUS sign then
give an option like -O<d> as:

	-O -

where option -O is separated by SPACE from the minus sign

or

	-O"-"

where the minus sign is enclosed by double quotes.

If an option has attached data like

	-O-xyz

or

	-O"-xyz"

then the attached option data is all of "-xyz" and the
option is NOT turned off.

For option data <d>, only the last use of the option in a
command line sequence with its data <d> is recognised, other
possible previous option <d> items are ignored.

Some options with data <d> can accept lists for <d>.  In this
case, use standard separators like commas "," or semi-colons ";"
for option data list items.

Also, a MINUS character '-' followed by white space and another
MINUS character '-', and other possible attached text specifies
the second minus character as a file or data spec too.  So the
sequence

	- -jk

on the command line will tell the program to use the file "-jk" as
a data source.

Options and Data:

On the command line, options starting with the '-' character and
data names for files can be mixed and continuous up to about 127
characters.

Options and data are interpreted in sequence, that is

	<program> -i <data>

will interpret the option "-i" before doing "<data>", but a
command like

	<program> <data> -i

will NOT use option "-i" for "<data>" because option "-i" did
not precede "<data>".

Option ENVIRONMENT variables

ENVIRONMENT variables for PentaTextTools are operating system
variables that You can make for configuring the DEFAULT
operation of a PentaTextTools program.

They have the base name of the program concatenated with the
string "_OPTIONS" and are specific to these programs.

eg

	NLX_OPTIONS

These variables are parsed for options and data at
the start of a program, and can be used to set the default
behaviour of the programs to user preferences from batch files
like AUTOEXEC.BAT.

An ENVIRONMENT variable can be set for each program to customise
its behaviour.

Memory ENVIRONMENT variables can be used to configure PentaTextTools
rather than files.  This is one the FASTEST ways to configure
program default behaviour each time the tools are run.

An example :

	set NLX_OPTIONS=-h

will make NLX operate on HIDDEN files too.

Also the ENVIRONMENT variable tracks the program name.

For example :

If NLX.EXE is renamed to be shorter, like X.EXE, then the
ENVIRONMENT variable is X_OPTIONS rather than NLX_OPTIONS.

If low on ENVIRONMENT space, let the CONFIG.SYS file have a line
like

	shell=c:\command.com c:\ /e:4096 /p

to have more space.  In this case, in MS-DOS_3.3+, the
environment is expanded to 4096 bytes, more than enough for most
PC systems.  See a PC operating system User Reference guide for
more information on the SHELL and the environment variables.

Another way to configure default behaviour is by using the
"-jF<d>" option or option files.  These allows a Command Line
File (CLF) to have its arguments processed like they would
appear on the command line.  So setting default options in the
ENVIRONMENT with a command line like

	set NLX_OPTIONS=-jFNLX.cfg

will make sure the file NLX.cfg is parsed for options
and other data before the program NLX continues to run
any command line parameters.

ENVIRONMENT variables can not include the '=' character and some
others like '|', '<' and '>'.  So default configuration by
option "-jF<d>" or option files is needed if

1)

default options must include special characters

or

2)

an ENVIRONMENT variable becomes too long for the allowable
command line length.

Also, ENVIRONMENT variables like <PROGRAM>_OPTIONS can extend
the potential command line more characters and these become the
FIRST Options and Data acted upon when the program starts up.

So if additional command line space is needed, a command like:

	set <PROGRAM>_OPTIONS=<SomeOptions and/or SomeData>

in a DOS BATCH file command line will help a TextTool <PROGRAM>
to have slightly larger space for options and data specs.

eg

	set NLX_OPTIONS=-h

Option Start and Quotes

Command Line arguments that start with Quotes followed
by the character - are interpreted as a data file.

So if a file called -i exists, then it can be specified on the
command line as "-i" enclosed in double quotes.

e.g.

	NLX "-minus"

will have Tool NLX operate on a file named "-minus".

Quoted portions further in an option string like -"i"
simply have the double quotes removed to become the option -i.

Common Options ENVIRONMENT variable

To have ALL tools in PentaTextTools use the SAME default options such
as any COMMON OPTIONS such as

	-f	  show File name at front of each line.
	-h	  select Hidden files too.
	-o	  Omit single file name at start of output.
	-r	  Recursive search for file(s), dir\files(s) or dir\.
	-C<d>	  pre-filter input data by Command <d> with sub [F].
	-X<d>	  eXclude files list.
	-jn	  wait for Network access.
	-jp	  do data Prompt.
	-jF<d>	  take options and specs from File name <d>.
	-ta<d>	  save All output to file <d>.
	-tc<d>    Column to wrap data display.
	-td	  show screen space or tab as Dot or diamond.
	-tk	  press Key to continue.
	-to<d>	  save Output to file <d>.
	-tw<d>	  save Warnings and error messages to file <d>.
	-tF<d>	  default directories for option -jF<d> command File(s).
	-tA	  append All output if option -ta<d>.
	-tO	  append Output if option -to<d>.
	-tW	  append Warnings and error messages if option -tw<d>.

Create a Batch File ENVIRONMENT variable such as

	TT_OPTIONS

that can be created in a file like AUTOEXEC.BAT with a line like

	set TT_OPTIONS=-h -X"*.exe;*.com" -mn -tFc:\tt -tc72 -td

to create the environment variable.

Then ADD it into a program's specific ENVIRONMENT variable with
another line such as:

	set NLX_OPTIONS=%TT_OPTIONS% -jFNLX.cfg

Other info:

If the first option to a program is the string "/i" then the
PROGRAM_OPTIONS ENVIRONMENT variable will be Ignored.

If a command line parameter of the form

	@<filename>

is given, the file <filename> becomes a source of command line
options and/or data specifications at that point, similar to
option -jF<d>.  This allows the command stream for a Text Tool
to be much longer than the 128 byte limit of the tool.

See Common Options.

The ENVIRONMENT variables in Nature are quite important too.

Be conservative and see the planet survive!

Nature dies...We die...Nature Lives...We Live!


See also INSTALL.


[ < < < Home ] [ < < Reference Start ] [ < Reference Contents ]
[ < Previous=Common Features ] [ Next=Common Options > ]

Intelligence Services

© Intelligence Services 1987 - 2008   GPO Box 9,   ADELAIDE SA 5001,   AUSTRALIA
EMAIL   :   intlsvs@gmail.com