home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
qtawkos2.zip
/
QTAWK.HIS
< prev
next >
Wrap
Text File
|
1994-11-21
|
45KB
|
866 lines
QTAwk Update History
==> QTAwk Version 6.00 for DOS and version 1.00 for OS/2, dated
05/01/94. This version contains several changes and additions
from the previous versions:
1. Arrays have been fully integrated into the match operators,
'~~' and '!~', both their direct use and their implied use in
patterns and as arguments of the functions 'match', 'sub',
'gsub' and 'split'. The use of an array as the operand of a
match operator will match against all elements of the array
as separate regular expressions. This is similar to the use
of the GROUP keyword in patterns.
If a match is found, the new variable MATCH_INDEX is set to
the string value of the index in the array of the matching
regular expression. If a multidimensional array is used, the
array indices are separated by the value of the built-in
variable SUBSEP (which has been re-introduced from Awk with a
slightly different use).
In addition, the use of arrays for the built-in variables RS
and FS enables the user to specify multiple regular
expressions for use as record separators and/or field
separators. The use of arrays for RS and/or FS does not
affect the value of MATCH_INDEX.
Arrays used for regular expression matching retain their
internal regular expression form until the whole array or an
array element is changed. Thus arrays can be be used as
dynamic regular expressions for which the user controls when
the internal form is changed.
2. New algorithms have been developed and used for regular
expression matching. A total of four different algorithms
are used for pattern matching. QTAwk automatically selects
the appropriate algorithm to optimize the search depending on
the regular expression(s) to be matched. The algorithm used
is selected based on the number of regular expression(s) to
match and the complexity of the regular expression(s).
3. The new variable MATCH_INDEX is defined. This variable is
set to the string value of the index of the matching element
when an array is used for matching.
4. The variable SUBSEP from Awk is re-introduced with a default
value of a comma character, ','. The value of SUBSEP is used
to separate the index values in MATCH_INDEX when a
multidimensional array is used for matching.
5. A new method of file processing has been introduced. In the
current and previous versions, the following process is
carried out:
a) Determine next record according to RS or RECLEN, see
below for an explanation of RECLEN,
b) Read next record,
c) Parse record into fields according to FS or FIELDWIDTHS,
see below for an explanation of FIELDWIDTHS,
d) Execute each pattern expression
1: If pattern expression is TRUE, execute associated
action
For QTAwk utilities in which all patterns contain a regular
expression match or for those files for which actions are
executed only for those records matching a set of one or more
regular expressions, the above process for each record can be
time consuming. It would be much faster to scan the input
file for matches to the desired regular expression(s) and
then execute each pattern expression once such a record has
been found. This by-passes the time consuming process of
reading individual records and parsing each into fields.
Only the desired records need to be read and parsed with the
new method, thus saving much time in the execution of the
QTAwk utility.
QTAwk Version 6.00 for PC/MS-DOS and Version 1.00 for OS/2
implements the new search method. Two new variables:
a) FILE_SEARCH
b) FILE_SEARCH_PAT
have been introduced for this purpose. When FILE_SEARCH is
TRUE, the next record read will be the record matching a
regular expression from FILE_SEARCH_PAT. If FILE_SEARCH is
FALSE, the normal file input process described above is
followed. The new file search process may be turned on and
off as necessary for a single input file in this manner.
FILE_SEARCH_PAT is set by the user utility to one or more
regular expressions against which records from the current
input file are matched. FILE_SEARCH_PAT may be set to a
single regular expression as a simple variable, e.g.,
■ FILE_SEARCH_PAT = /test string/;
or a singly dimensioned array, e.g.,
■ FILE_SEARCH_PAT[1] = /test string 1/;
■ FILE_SEARCH_PAT[2] = /test string 2/;
■ FILE_SEARCH_PAT[3] = /test string 3/;
■ FILE_SEARCH_PAT[4] = /test string 4/;
or a multidimensioned array, e.g.,
■ FILE_SEARCH_PAT[1][1] = /test string 1,1/;
■ FILE_SEARCH_PAT[1][2] = /test string 1,2/;
■ FILE_SEARCH_PAT[1][3] = /test string 1,3/;
■ FILE_SEARCH_PAT[2][1] = /test string 2,1/;
■ FILE_SEARCH_PAT[2][2] = /test string 2,2/;
■ FILE_SEARCH_PAT[2][3] = /test string 2,3/;
■ FILE_SEARCH_PAT[3][1] = /test string 3,1/;
■ FILE_SEARCH_PAT[3][2] = /test string 3,2/;
■ FILE_SEARCH_PAT[3][3] = /test string 3,3/;
When FILE_SEARCH is TRUE, the current input file is scanned
for a match to FILE_SEARCH_PAT. When a record is found
matching a regular expression in FILE_SEARCH_PAT, the record
is read, parsed into fields according to FS or FIELDWIDTHS
and each pattern expression executed. The associated actions
for TRUE pattern expressions are executed. Note that the
variables RS or RECLEN still determine the parsing of the
input file into records.
Under some circumstances, the above process can return in
'$0' multiple records from the current input file. In
searching the input file for a match to FILE_SEARCH_PAT, a
match may span more than one record if the new variable,
SPAN_RECORDS, is TRUE. In this case, '$0' is set to the full
set of records spanning the match to FILE_SEARCH_PAT. If
SPAN_RECORDS is FALSE, any matches to FILE_SEARCH_PAT are not
allowed to span input records and '$0' will contain only a
single record.
6. The new variable FILE_SEARCH is defined as described above.
7. The new variable FILE_SEARCH_PAT is defined as described
above.
8. The new variable SPAN_RECORDS is defined as described
above.
9. The action of QTAwk when NF is changed now reflects the
intuitive effect of changing NF. If the new value is greater
than the current value, the current input line is lengthened
with new empty fields separated by the output field separator
string, OFS. If the new value is less than the current
value, the current input line is shortened by truncating at
the end of the field corresponding to the new NF value.
10. Two new input functions have been introduced:
a) srchrecord(sp)
or srchrecord(sp,rs)
or srchrecord(sp,rs,var)
is similar to the function 'getline'. 'srchrecord' will
search the current input file for the next record or
records matching the search pattern, 'sp'. If the record
separator parameter, 'rs', is not specified, records are
determined by the variable RS or RECLEN. If 'rs' is
specified, record boundaries are determined by the
strings matching 'rs'. 'rs' may be a simple constant or
variable or an array. The record or records matching the
search pattern are returned in '$0' if 'var' is not
specified. If 'var' is specified, the matching record or
records are returned in 'var'. The built-in variables,
FNR and NR are updated to reflect the current position
and record number after the search. The built-in
variables, NF and '$i', i ≤ 0 ≤ NF, are set when 'var' is
not specified.
b) fsrchrecord(file)
or fsrchrecord(file,sp)
or fsrchrecord(file,sp,rs)
or fsrchrecord(file,sp,rs,var)
is similar to the function 'fgetline'. 'fsrchrecord'
will search the file specified for the next record or
records matching the search pattern, 'sp'. If the record
separator parameter, 'rs', is not specified, records are
determined by the variable RS or RECLEN. If 'rs' is
specified, record boundaries are determined by the
strings matching 'rs'. 'rs' may be a simple constant or
variable or an array. The record or records matching the
search pattern are returned in '$0' if 'var' is not
specified. If 'var' is specified, the matching record or
records are returned in 'var'. The built-in variables,
NF and '$i', i ≤ 0 ≤ NF, are set when 'var' is not
specified.
Both functions have identical returns to the 'getline' and
'fgetline' functions, i.e.,
a) the number of characters in the record(s) matched plus
the End-Of_Record length plus 1
b) zero, 0, if End-Of-File was reached before finding a
match
c) -1 on a file read error.
getline() getline(v) fgetline(F) fgetline(F,v)
srchrecord() srchrecord(v) fsrchrecord(F) fsrchrecord(F,v)
$0 updated not updated updated not updated
$i, i>0 updated not updated updated not updated
NF updated not updated updated not updated
NR updated updated not updated not updated
FNR updated updated not updated not updated
Note: the function parameters sp and rs have not been
shown in 'srchrecord' and 'fsrchrecord' to highlight the
similarity with the functions 'getline' and 'fgetline' and
their effect on the variables indicated.
11. The new function 'get_FNR' has been introduced. This
function returns the current record number for the file
specified. The two forms are:
a) get_FNR()
This form returns the current record number of the
current input file. The value returned is equal to the
built-in variable FNR.
b) get_FNR(filename)
This form returns the current record number of the input
file specified. If filename == FILENAME, this form is
equivalent to the first form. If the filename specified
is not open or is not open for input, a value of zero, 0,
is returned.
This function has been added because of the input functions
'fgetline' and 'fsrchrecord'. For the current input file,
the built-in variable FNR is always updated automatically to
contain the record number of the last record input (the
current record). However, when reading from a file other
than the current input file, previously there was no means of
obtaining the current record number of the input file. With
'fgetline', the user utility could maintain an independent
count of records read. However, if the 'fsrchrecord'
function is used, there is no other means of obtaining the
record number of the last record read.
12. The function 'resetre' has been introduced. In previous
versions, once a regular expression has been used to search
for a match, the internal form of the regular expression is
set and could not be changed. If the regular expression
contained embedded named expressions and the value(s) of the
corresponding variables changed, the new values of the
variables could not be incorporated into the regular
expression. This improved the speed of scanning since the
regular expressions did not have to be converted to internal
form for each use. To obtain the variability needed for
changing variable values, strings were used for matching.
For match expressions which change frequently, strings used
for match operators are still the better choice, since they
are converted to internal form for each use. However, for
those occasions where the match expression changes
infrequently due to the change in value of embedded named
expressions, the use of a string leads to impaired
performance. This function has been introduced for just such
use. This function releases the internal form of all regular
expressions so that the next time it is used as the search
pattern for a match operation, the internal form is rebuilt
using the then current values of any variables used in named
expressions.
Note that the use of arrays for match patterns falls between
the use of strings, for which the internal regular expression
form is rebuilt for each use, and regular expressions for
which the internal form is built for the first use and then
remains static. When arrays are used for matching, the
internal regular expression form is built when first used and
retained until the array is changed. For arrays the internal
regular expression form is assigned when the array as a whole
is assigned to another variable. Thus the internal regular
expression form can be retained and reused.
13. The new variable FILEATTR is defined. This variable
contains the attributes of the current input file in a
string. The string defines the attributes in the same manner
as the variable for the 'findfile' function defines the
attributes for the files found by that function.
14. The new variable FILEDATE is defined. This variable
contains the date of the current input file in the operating
system format. The 'sdate/stime' functions may be used to
format the date.
15. The new variable FILEPATH is defined. This variable
contains the drive and path of the current input file. The
path string ends with the subdirectory separator character.
16. The new variable FILESIZE is defined. This variable
contains the size in bytes of the current input file.
17. The new variable FILETIME is defined. This variable
contains the time of the current input file in the operating
system format. The 'sdate/stime' functions may be used to
format the time.
18. The following built-in variables have been added:
a) FILEDATE_CREATE - date of file creation as returned by
the Operating System.
b) FILETIME_CREATE - time of file creation as returned by
the Operating System.
c) FILEDATE_LACCESS - date of last file access as returned
by the Operating System.
d) FILETIME_LACCESS - time of last file access as returned
by the Operating System.
The same variables are available in the PC/MS-DOS version,
butr their values are set equal to the values of FILEDATE and
FILETIME.
19. The functions 'sdate' and 'stime' have been changed from
previous versions. The fixed formats supported by previous
versions have been replaced by the use of a 'format string'
identical to that supported by ANSI C. The forms are:
a) sdate(frmt_strg) return string formatted according to
'frmt_strg' using current system date and time.
b) sdate(frmt_strg,fdate) return string formatted according
to 'frmt_strg' using date specified in fdate and current
system time. fdate is a file date in the operating
system format.
c) sdate(frmt_strg,year,month,day) return string formatted
according to 'frmt_strg' using date specified in 'year',
'month' and 'day' and current system time.
d) stime(frmt_strg) return string formatted according to
'frmt_strg' using current system date and time.
e) stime(frmt_strg,ftime) return string formatted according
to 'frmt_strg' using time specified in ftime and current
system date. ftime is a file time in the operating
system format.
f) stime(frmt_strg,hour,minute,second) return string
formatted according to 'frmt_strg' using time specified
in 'hour', 'minute' and 'second' and current system
date.
The format string is similar to those used in the 'print'
functions except that the following substitutions are made:
% Substitution Made
%a --> Locale's Abbreviated Weekday Name
%A --> Locale's Weekday Name
%b --> Locale's Abbreviated Month Name
%B --> Locale's Month Name
%c --> Locale's Appropriate Date And Time Representation
%d --> Day Of The Month As A Decimal Number (01-31)
%H --> The Hour (24-hour Clock) As A Decimal Number (00-23)
%I --> The Hour (12-hour Clock) As A Decimal Number (01-12)
%j --> The Day Of The Year As A Decimal Number (001-366)
%m --> The Month As A Decimal Number (01-12)
%M --> The Minute As A Decimal Number (00-59)
%p --> The Locale's Equivalent Of The AM/PM Designations
Associated With A 12-hour Clock
%S --> The Second As Decimal Number (00-61)
%U --> The Week Number Of The Year (the First Sunday As The
First Day Of Week 1) As A Decimal Number (00-53)
%w --> The Weekday As A Decimal Number (0-6), Where Sunday Is 0
%W --> The Week Number Of The Year (the First Monday As The
First Day Of Week 1) As A Decimal Number (00-53)
%x --> The Locale's Appropriate Date Representation
%X --> The Locale's Appropriate Time Representation
%y --> The Year Without Century As A Decimal Number (00-99)
%Y --> The Year With Century As A Decimal Number
%Z --> The Time Zone Name Or Abbreviation, Or By No Character If
No Time Zone Is Determinable
%% --> %
20. The functions 'jdn' and 'cal' have been modified. 'jdn'
computes the Julian Day Number for an associated date. 'cal'
computes the date for a given Julian Day Number. The Julian
Day Number is very useful in date computations. The forms
are:
a) jdn()
Computes the Julian Day Number for the current System
Date.
b) jdn(fdate)
computes the Julian Day Number for the file date, fdate,
in the operating system format.
c) jdn(year,month,day)
computes the Julian Day Number for the date specified.
d) cal(frmt_strg,jdn)
return string formatted according to 'frmt_stgr' using
date specified in Julian Day Number, jdn, and current
system time. The format string, frmt_strg, is the same
as used by the 'sdate' and 'stime' functions above. If
the jdn passed is an integer as calculated and returned
by the 'jdn' function, then the current system time is
used for any time substitutions. If the jdn passed is a
floating point number, the fractional part is used to
compute the time used.
21. The new command line option, "-Ww filename", has been
introduced. This option allows the user to write the
internal form of a utility to the specified file. The
internal form may then be specified with the "-f" option.
Reading the internal form of a utility in this manner can
greatly speed the initial execution of the utility.
22. The command line switch '-Wd' has been introduced. This
switch causes QTAwk to delay parsing of the input until an
input field, "$i", or the "NF" variable is accessed. Without
this switch, QTAwk parses each input record as it is read.
For utilities which do not access input fields for every
record or very few records, this can speed up processing
considerably.
23. The following built-in variables have been added:
a) MATCH_INDEX - see the description of the expanded 'sub'
and 'gsub' functions below.
b) CONVFMT - specifies the format used to convert floating
point values to a string value. Previously the value of
OFMT was used for this purpose. OFMT is now used only
for formatting floating point values for output.
c) IGNORECASE - if assigned a true value, QTAwk ignores
alphabetic case in all match operations against strings
and regular expressions. This is true for all built-in
functions using regular expressions and in searches for
record terminator and field terminator strings using RS
and FS respectively.
d) RT - Contains the full string value of the record
terminator of the current input record. If the value of
RS is not changed, this always contains a single new line
character. If the value of RS is changed to an array or
a regular expression, then the record terminator can
change with each input record. The value of RT gives the
user access to the current value of the terminator.
e) RECLEN - used to specify the length of fixed length
records. If RECLEN has an integral non-zero value, the
value is used to read the next record and RS is ignored.
When RECLEN is used to determine input records, RT is
always set to the null string.
f) FIELDWIDTHS - when assigned a string value containing
space separated integral numbers of the form:
n1 n2 n3 ... nn
the splitting of input records into fields is governed
by the numbers in FIELDWIDTHS rather than FS. Each
number in FIELDWIDTHS specifies the width of a field
including columns between fields. If you want to ignore
the columns between fields, you can specify the width as
a separate field that is subsequently ignored. When the
value FIELDWIDTHS does not match this form, field
splitting is done using FS in the usual manner.
g) FIELDFILL - used to fill a field when the replacement
value is less than the field width. This variable value
is used only when field splitting is based on FIELDWIDTHS
rather than FS. The default value is a single blank
character.
h) DELAY_INPUT_PARSE - used to delay parsing of the current
input record until the value of NF or one of the field
variables, $i, 1 ≤ i ≤ NF, is needed. The default value
is false. If the value is true, then the input record is
not parsed until necessary. For utilities which do not
reference NF or the field variables, $i, or seldom
reference them, delaying the parsing of the input record
can speed the execution of the utility significantly.
24. The command line option "-vvar = value" has been introduced
to assign "value" to the variable "var' before execution of
the utility starts. This makes the assigned value of "var"
available in any BEGIN actions. This option may be used
multiple time on the caommand line to assign multiple
variables.
25. The command line option "-Wd" has been introduced to delay
input parsing until needed. See the description of the
built-in variable "DELAY_INPUT_PARSE" above.
26. The command line option "-wfilename" has been changed to
"-Wwfilename" to conform to the POSIX specifcation.
27. The predefined pattern, GROUP, has been expanded to accept
any valid QTAwk expression. The expressions in a GROUP
pattern are evaluated when the GROUP patterns are first
matched against an input line. The expression is evaluated
and the result converted to a regular expression. If the
result of the expression is an array, the entire array is
matched at the corresponding position in the GROUP pattern.
28. The 'sub' and 'gsub' functions have been expanded. The
second argument, the replacement string expression, is no
longer evaluated at the time the function is called, but when
the replacement string is used for replacement. Since the
first argument, the match pattern expression, may now be an
array, the value of the built-in variable, MATCH_INDEX, can
be affected as matches are made. By delaying the evaluation
of the replacement string expression until the replacement is
made, the change in MATCH_INDEX can be used to affect the
value of the replacement string for each replacement. QTAwk
guarantees that the replacement string expression will be
evaluated as replacements are made in the text string from
left to right. For constant expressions used for the
replacement string, this change has no direct effect.
29. The Tagged string operator, '$$', has been fixed to
properly yield the tagged strings.
30. A new standard file, in addition to "stdaux", "stdin",
"stderr", "stdprn" and "stdout", has been introduced,
"keyboard" for unbuffered input directly from the keyboard.
The built-in variable "ECHO_INPUT" also controls echoing of
input characters from this "file" to the standard output
file. The standard files are defined in more detail in
{BIF_E}.
31. The returns from the "getline" and "fgetline" functions
have been altered slightly. The values returned are the same
as the new functions "srchrecord" and "fsrchrecord":
a) the number of characters read plus the length of the
End-Of-Record string plus 1,
b) 0 if End-Of-File was encountered, or
c) -1 if an error occurred.
==> QTAwk Version 5.11, dated 03/30/92. This version contains
two additions from the previous versions:
1. The predefined variable FILE_SORT has been added to control
the sequence of files returned by the "findfile" built-in
function.
2. The predefined variable "Gregorian" has been added to
control the use of the Gregorian or Julian Calendars in
converting to/from dates and Julian Day Numbers by the
built-in "cal", "jdn" and "sdate" functions.
==> QTAwk Version 5.10, dated 10/01/91. This version contains
several changes and additions from the previous versions:
1. The command line variable setting mechanism:
variable = value
has been fixed.
2. The function "jdn(fdate)" or "jdn(year,month,day)" has been
added to compute the Julian Day Number (jdn) of a specified
date. The Julian Day Number is very useful for date
computations.
3. The function "cal(jdn,form)" has been added to complement
the 'jdn' function above. The "cal" function returns the
date corresponding to the specified jdn passed.
4. The function "findfile" has been added. This function has
the following forms
a) findfile(var)
b) findfile(var,pattern)
c) findfile(var,pattern,attributes)
where:
a) var == the variable in which to return the array of
files found which match the pattern specified
b) pattern == a string specifying the pattern to match the
filenames. Follows the DOS wildcard convention. If no
pattern is specified, "*.*" is used.
c) attributes == a string specifying the desired file
attributes: Archive, Read-Only, Hidden, System,
Sub-Directory, or Volume ID.
This function returns the number of files found which match
the pattern specified. The file names, sizes, last modify
date and times are returned via the variable specified. The
file date and time are returned in "DOS format" which is good
for sorting purposes, but unreadable. The "stime" and
"sdate" functions have been expanded to include the file time
and date and format them as desired.
5. The "sdate" function has been expanded to return the Julian
Day Number as a formatting option and can format any
specified date as well as the file date returned by the
"findfile" function.
6. The "stime" function has been expanded to be able to format
any specified time as well as the file time returned by the
"findfile" function.
7. For format arguments greater than the number of format
options the 'sdate' and 'stime' functions no longer terminate
execution with an error message. The remainder operator is
silently used to obtain a correct formatting option.
==> QTAwk Version 5.00, dated 02/01/91. This version contains
several additions from the previous versions:
1. The character output functions 'putc(c)' and fputc(c,F)'
have been added. These functions are identical in operation
to the C functions of the same names. With the 'getc' and
'fgetc(F)' functions of the previous versions, the user now
has a complete set of character I/O.
2. The built-in variable 'ECHO_INPUT' has been added.
ECHO_INPUT has a default value of FALSE. If TRUE, when
reading from the standard input file, normally the console
keyboard, the input is echoed to the standard output file,
normally the console display. When the standard input file
is re-directed from a file, it is convenient to set
ECHO_INPUT to FALSE to prevent echoing each input character
to the display.
3. The variable "QTAwk_Path" has been added. If an environment
setting for "QTAWK" exists, QTAwk_Path is set to the value of
the setting upon program initiation. This string value is
then used in searching for input files. The search sequence
for files follows the the order:
a) If a directory and/or path name name is specified with a
file, then that path only is searched.
b) If no directory or path name is specified, then the
current directory is searched. If the file is not found,
then all paths specified in QTAwk_Path are searched for
the file in the order specified. Multiple paths may be
specified, separated by a semi-colon. This follows the
same convention for specifying multiple paths in the
system environment path setting "PATH".
The value of QTAwk_Path may be reset at any time by the
user's utility to change the paths to be searched for desired
files to be opened for reading.
4. The built-in function 'append(filename)' has been added.
Executing this function before any output to "filename" will
cause all output to be appended to the end of the file
"filename" if it currently exists. Closing the file,
"filename", with the 'close' function will cancel the effect
of 'append' for any subsequent output to that file.
5. The tagged string operator, '$$', has been expanded to
accept numerical expressions in the forms:
a) $$0 --> refers to the entire string matched by the last
regular expression in the pattern.
b) $$0.0 --> refers to the entire string matched by the last
regular expression.
c) $$j --> refers to the string matching the regular
expression contained in the parenthesis set at nesting
level 1 and count j in the last regular expression.
Valid values of j are in the range 1 ≤ j ≤ 31. Identical
to $$1.j of the next form.
d) $$i.j --> refers to the string matching the regular
expression contained in the parenthesis set at the ith
nesting level, jth count in the last regular expression.
Valid values of i and j are in the range 1 ≤ i ≤ 7, 1 ≤ j
≤ 31.
e) $$variable_name --> this form may expand into any one of
the previous forms. If the variable operated on by '$$'
is a string or regular expression, it is first converted
to numeric form.
Thus $$5.02, is the string matching the regular expression
contained within the parenthesis at the fifth level and 2nd
count.
==> QTAwk Version 4.20, dated 10/11/90. This version contains
three additions from the previous versions:
1. The behavior of the RS predefined variable has been
changed. It is now similar to the behavior of the FS
variable. If RS is assigned a value, which when converted to
a string value, is a single character in length, then that
character becomes the record separator. If the string is
longer in length than a single character, then it is treated
as a regular expression. The string matching the regular
expression is treated as a record separator. As for FS, the
string value is converted to the internal regular expression
form when the assignment is made.
2. Two new functions have been added:
getc() --> reads a single character from the current input
file. The character is returned by the function.
fgetc(file) --> reads a single character from the file
'file'. The character is returned by the function.
These functions allow the user to naturally obtain single
characters from any file including the standard input file
(which would be the keyboard if not redirected or piped).
3. Error messages now have a numerical value displayed in
addition to the short error message. The error messages are
listed in numerical order in the QTAwk documentation with a
short explanation of the error. In some cases, an attempt
has been made to provide guidance as to what may have caused
the error and possible remedies. Since the error messages
are generated at fixed points within QTAwk and may be caused
by different reasons in different utilities during
interpretation or during execution on data files, it is not
possible to list every possible reason for the display of the
error messages. The line number within the QTAwk utility on
which the error was discovered and the input data file record
number are provided in the error message to provide some help
to the user in attempting to ascertain the real reason for
the error.
==> QTAwk Version 4.10. This version contains one addition from
the previous versions:
1. In previous versions, the GROUP pattern keyword could accept
patterns consisting only of a regular expression constant.
For version 4.10, The GROUP pattern keyword has been expanded
to accept regular expression constants, string constants and
variables. The variables are evaluated at the time the GROUP
patterns are first utilized to scan an input record. The
value is converted to string form and interpreted as a
regular expression.
GROUP /regular expression constant/ { actions }
GROUP "string constant" { actions }
GROUP Variable_name { actions }
GROUP patterns are still converted into an internal form for
regular expressions only once, when the pattern is first used
to scan an input line. Any variables in a GROUP pattern will
be evaluated, converted to string form and interpreted a
regular expression.
==> QTAwk Version 4.02. This version contains two additions
from the previous versions:
1. The command line argument, double hyphen, "--", stops
further scanning of the command line for options. The double
hyphen argument is not passed to the QTAwk utility in the
ARGV array or counted in the ARGC variable. Since QTAwk only
recognizes two command options, this has been included to be
compatible with the latest Unix(tm) conventions.
2. The built-in array ENVIRON has been added. This array
contains the environment strings passed to QTAwk. Changing a
string in ENVIRON will have no effect on the environment
strings passed in the QTAwk "system" built-in function.
Environment strings are set with the PC/MS-DOS "SET"
command. The strings are of the form:
name = string
where the blanks on either side of the equal sign, '=', are
optional and depend on the particular form used in the "SET"
command. The QTAwk utility may scan the elements of ENVIRON
for a particular name or string as desired.