home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.wwiv.com
/
ftp.wwiv.com.zip
/
ftp.wwiv.com
/
pub
/
MISC
/
EXTR_NET.ZIP
/
extr_net.doc
< prev
next >
Wrap
Text File
|
2003-03-07
|
7KB
|
142 lines
EXTR_NET
Version 2.30
Copyright (c) Bob Swift, 1988-2003. All Rights Reserved.
This program is designed to read an input nodelist file and extract
selected Networks, Regions and/or Zones. The extracted portions of
the nodelist are stored in a file specified on the command line.
The format for using this program is as follows:
EXTR_NET [-q] [-i] -s "srcfile" -d "destfile" <net1> [<net2>...<net20>]
where "srcfile" is the name of the nodelist file to be read
"destfile" is the name of the output file created
-q operate in "quiet" mode (suppress screen output)
-i optionally include all Zone entries
<net..> are the numbers of the Net/Region/Zones to be extracted
and may include zone specifiers for Nets and Regions
(the program is presently set to handle 20 numbers).
These numbers may be preceded by a N, R or Z in order
to extract the entire Net, Region or Zone. Examples
are: 123 N342 n2:201 r17 Z1
The source and destination files may be specified with a full drive and
path. If there are spaces in the name or path, the entry must be enclosed
in quotes ("").
The inclusion of Zone lines is controlled in two ways and they operate
differently. The first way is to use the optional '-i' parameter, which
will include all Zone lines in the nodelist. The other way is to use a
zone-specifier with the search criteria. This will only include those
Zone lines which are specified in the search criteria. For example, if
your command line looks like this:
extr_net -s nodelist.123 -d net-342.123 -i n342
the output would include all Zone listings as well as all of the entries
in Net 342 in every zone where Net 342 appears. If the command line is
modified as:
extr_net -s nodelist.123 -d net-342.123 n342
the output would not include any Zone listings but would include all of
the entries in Net 342 in every zone where Net 342 appears. If the
command line is further modified as:
extr_net -s nodelist.123 -d net-342.123 n1:342
the output would not include any Zone listings except Zone 1, and would
include all of the entries for Net 342 in Zone 1. Note that use of the
'-i' parameter will always result in the inclusion of all Zone lines.
The program will display a VERY brief set of instructions if it is called
without any arguments or if it encounters an error. The following is a
list of the error codes returned by the program:
0 - No errors. Normal termination.
1 - Bad or missing command line argument.
2 - Unable to open the input file.
3 - Unable to open the output file.
4 - Problem writing to output file.
5 - Problem closing input file.
6 - Problem closing output file.
7 - No extraction criteria specified.
-1 - Help screen (called with -?)
When an error is encountered, the program will exit immediately and will
attempt to properly close all files.
Although I have chosen to retain all rights to this program, you are free
to use it under the following conditions:
- You realize that there is NO Warrantee of any sort.
It was tested pretty thoroughly here before release
but who knows what bugs may be lurking within.
- You will not modify the code and release a new version
of the program. I welcome suggestions for improvement
(especially when accompanied by code) but I make no
guarantee of future releases.
- If you find the program useful, I ask that you do
something to brighten somebody else's day. Just
exactly what, I will leave up to you.
You may freely distribute this program provided that you distribute only
the complete archive.
Bob Swift
FidoNet: 1:342/5
Internet: bswift@shaw.ca
Revision History
----------------
1.00 88/11/08 First release version.
1.01 88/11/08 Correct a minor problem with file names and the
creation of the output backup file.
1.10 88/11/09 Finally corrected the null pointer and backup bug
for good this time. Someday I will learn to handle
strings properly <grin>. Also cleaned up the error
code handling section so that the error messages
make sense and included comment lines in output
file to show what input file was used and to
separate each extracted Net/Region.
2.00 89/05/07 Modified command line inputs slightly to allow
extraction of entire Net, Region or Zone by specifying
N, R or Z with the number. Numbers entered with no
specifier will be matched to anything but will only
extract until the next occurence of a Host, Region or
Zone statement. Also echoed the search criteria to
the output file.
2.01 91/12/28 Cleaned up comments in output file.
2.02 93/09/12 Updated the FidoNet address in the documentation.
2.10 93/09/26 Added option to include all Zone entries. Also
added option of zone-specific Net and Region
searches due to there being duplicate Net and
Region numbers in different Zones.
2.11 93/09/26 Cleaned up error exit screen.
2.12 93/11/14 Added date and time stamping in output file at the
request of Tom Hall (NC342).
2.20 94/05/29 Now puts the correct CRC value in the first line.
2.30 03/03/07 Updated for Linux binaries. Revised command line
format. Added -q (quiet) option.