home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
- This set of programs was done to 'work' data files allowing
- the partial selection of the data with different criterions.
-
- You can test it by free but if you keep using it you must
- register as user. If you develop systems for third parties
- you can also integrate it within your own application but
- you must register the number of copies your client will use,
- for more than 5 copies installed at a single company ask for
- quantity discounts. Registered users will be notified of bug
- reports, workarounds, and release of new versions.
-
- Single copy registration fee: $ 50 USD
-
- The programs included are the following:
-
- Modify Allows insertions and deletions of 'columns' (the
- same positions of every record of the file) as
- convertions to upper or lowercase, trimming
- (elimination of leading and/or trailing spaces)
- and elimination of supplementary spaces (all con-
- secutive spaces in the input are left as one space
- in the output).
-
- Fields Instead of seeing the file as a set of columns
- this program sees it as a set of fields separated
- by arbitrary delimiters. You may select the set of
- delimiters to be used and a subset of fields to
- send the output. You also can convert the fields
- to fixed length, in such case the fields will be
- truncated or padded with spaces at the right. As
- in 'Modify' you can convert to upper or lower case
- and eliminate identical consecutive records.
-
- Head With this program you can send to the output only
- the first n lines of a file.
-
- Tail This program send to the output the last n lines
- of a file or all the lines but the n first ones.
-
-
-
-
-
-
-
- 1
-
-
-
-
-
- Lines With this one you can select the lines to send to
- the output the lines that acomplish certain condi-
- tions as
- a) Contains (or not) some literal,
- b) All lines after the first one containing some
- literal.
- c) All lines until one that contains some literal.
-
- The literals can be expressed in a few forms as:
- the first word in the line, the last one or
- anyone, you can also specify that the word must
- begin, end or contain a set of consecutive charac-
- ters and the search may be case sensitive or in-
- sensitive.
-
- Every time the programs ran check themselves to prevent con-
- tamination originated on virus, disk errors, etc. This can
- take a few seconds but I hope you will appreciate this
- little loss of performance in change of increased security.
-
- The programs can reside in any directory you may want but
- they must not be renamed as the name is included in the
- self-checking procedure.
-
- The programs have a common interface so the parameter han-
- dling is the same for all programs. Following is a little
- explanation about that common interface.
-
- In general a command line should be in the form:
-
- progname -{a|b} [-c:12,<literal>] [<]InpFile [[>]OutFile]
-
- progname without any parameter will display the help screen.
-
- Parameters or symbols enclosed in square brackets [..] are
- optional.
-
- Parameters or symbols enclosed in square brackets {..} are
- mandatory but you must select one of the options separated
- by commas or vertical bars.
-
-
-
-
-
- 2
-
-
-
-
-
- In the above example:
- -{a|b} means that you must select either -a or -b
-
- [-c:12,<literal>] means that this parameter can be ommited,
- if you use it you must replace <literal> with a literal (see
- below the sintax for literals).
-
- [<]InpFile means that InpFile must be present, you must re-
- place InpFile with the file name you want to use. The [<]
- part means that the < can be used to redirect the file.
-
- [[>]OutFile] means that the OutFile can be ommited, in such
- case the output will be sent to the screen. If OutFile is
- present you can use the > to redirect the file.
-
- For more details about the files see the FILES section
- below.
-
-
- PROGRAM PARAMETERS
-
- Parameters or switches start with a dash '-' wich is inter-
- changeable with a slash '/'.
-
- Parameters must be separated between them but at least one
- space and can't be 'stacked'. What I mean is that -a -b
- isn't the same that -ab as used in some programs.
-
- Sometimes a plus sign '+' is used to invert the significance
- of the parameter.
- i.e.: -n is used to indicate the program 'Tail' the number
- of lines (counted from the end of the file) to send to the
- output, while using +n instead of -n means send all file but
- the first n lines.
-
- The letter(s) that identify the parameters can be upper or
- lower case so /n -n -N and /N have the same meaning for the
- program.
-
- Some parameters, like -i, to insert characters, or -lf, to
- specify the file to be used for logging, have sub-
- parameters. The colon ':' or the equal sign '=' can be used
-
-
-
- 3
-
-
-
-
-
- to separate the parameter 'name' from the data, the comma
- ',' is used as separator when the data consists of more than
- one item.
-
-
- RANGES
-
- Sometimes is needed to indicate a range as in 'positions 10
- to 13' this can be expressed as 10;13 or 10/13; in some
- cases you may want to say something like '4 characters
- starting on position 10', this could be expressed as 10,4 or
- 10:4 and it's equivalent to the previous example. All forms
- are interchangeable, you may use that fitting better your
- needs.
-
-
- LITERALS
-
- Some parameters requires literals, those must be enclosed
- between a pair of delimiters. The character used as
- delimiter must not be contained in the literal. The pairs of
- delimiters allowed are the following:
- (..) brackets
- [..] square brackets
- {..} curly brackets
- '..' right quotes (apostrophes)
- ".." double quotes
-
- If it's necessary to include control characters in a literal
- this can be done in two ways: ^A and #001 will produce the
- same result because the internal representation of the
- Control-A is a byte with a decimal value of 1. While
- processing the string the program interprets the ^x (being x
- any character in the range @ to Del) and replaces the caret
- '^' and the character to its right by the corresponding
- value. To indicate a special character in the #ddd form the
- # must be followed by exactly 3 digits in the range 000 to
- 255, in such case the four characters will be replaced by a
- single one with the desired value.
-
-
-
-
-
-
- 4
-
-
-
-
-
- You must be careful using the following characters:
- angle brackets: < and > and vertical bar: |
- Any of these characters will be interpreted by the DOS as an
- instruction to redirect a file. To prevent it you must re-
- place it with its decimal representation:
- < = #060 > = #062 and | = #124
-
- The reverse slash \ is used by the programs as 'escape
- character' to eliminate the special significance of the
- caret ^, the numeral # and the reverse slash \ itself.
- So if you want to include a # in a string you must escape it
- by preceding it with a reverse slash, i.e.: #000 will result
- in a byte with all bits in zero but \#000 will left a # fol-
- lowed by three ASCII zeros. \^A will result in a caret fol-
- lowed by a letter A but \\^A will result in a reverse slash
- followed by a byte with the value of the Ctl-A.
-
- Another characters that may confuse the program if included
- in literals are the slash / and the dash - but only when are
- preceded by a space because this configuration will be in-
- terpreted as a parameter. In this cases you can escape the
- slash or dash with the reverse slash, so instead of ".. /.."
- would be better to use ".. \/.." or "..#032/..".
-
-
- FILES
-
- Input
-
- [<]InputFile means that the input file can be redirected or
- piped from another program or named but must be present,
- i.e. < FileName or FileName are both valid options. The only
- case where you don't need to put the InputFile is when you
- are piping in the output of another program by using the |
- before the program name. In general input from the keyboard
- is not allowed.
-
- Output
-
- You may use the > to redirect the output to any file, port
- (COMx, LPTx), the standard printer (PRN), the screen (CON)
- or even to the bit bucket (NUL).
-
- [[>]OutputFile] means that the output can be:
-
- 5
-
-
-
-
-
- redirected to a file as in > FileName,
- appended to a file as in >> FileName,
- piped to another program as in | Prog2,
- named as in FileName
- or ommited at all to send the output to the screen.
-
- You can pipe to the InpFile of this program the OutFile of a
- previous one and/or the OutFile of this program to the
- InpFile of the next one in the pipe.
- i.e.: FirstProg | ThisProg | LastProg
- For more details please, read the DOS manual.
-
-
- Logging (Statistics and Errors)
-
- The program headers and statistics are ever sent to the
- screen independently of where the output is directed. This
- info can be redirected to a file, there a special parameter
- intended to do that: -lf:LogFile you must replace LogFile
- with any file name you may want to use, included NUL. The
- file will not be overwritten, all info sent will be appended
- to the file so if you forget to clean it time to time the
- file will grow up until filling your disk.
-
-
- Commands
-
- As some command lines can be too long some programs are able
- to read the parameters of the command (those starting with a
- dash but not the file names) from a file. To do that you
- must specify: -cf:CommandFile where you should replace
- CommandFile with any file name you want to use.
- The commands in that file must be arranged one by record and
- you can make it with any editor, with the 'COPY CON' DOS
- command and even could generate it with a program, in such
- case each command must be terminated by a <CR><LF> sequence.
-
-
-
-
-
-
-
-
-
- 6
-
-
-
-
-
- When the program finishes you will see a report with statis-
- tics as follows:
-
- Input: 0 records with 0 bytes
- Output: 0 records with 0 bytes
- Time to run: 0.0 sec.
- ProgName finished on 1991-02-25 17:04:58 with ErrorLevel: 0
-
- Time to time, after that report you will see a message like
- this one:
- ------------------------------------------------------------
- A little reminder: If you keep using this program you MUST
- register!
- For payment instructions at the DOS prompt type ProgName -?
- If you already have done it THANKS! .. and excuse me for
- this intromission.
- ------------------------------------------------------------
-
- I hope that this don't bothers you too much.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 7
-
-
-
-
-
- This is the help screen of the program Modify
- (sligthly reformated to fit the 60 columns of this manual)
-
- Modify.01.04 - 01/Feb/91 - (c) 1990, 1991 SoftWare Plus SA -
- Eduardo J. Salom
-
- usage: modify [-tl] [-tr] [-d:ccc,nnn] [-d:ccc/nnn] \
- [-i:ccc,'...'] [[<]InpFile] [[>]OutFile]
- or: modify -cf:CmdFile [[<]InpFile] [[>]OutFile]
- where:
- -tl Trim Left = Delete heading spaces.
- -tr Trim Right = Delete trailing spaces.
- -d:c,n Delete n chars starting on position c.
- (the ',' can be replaced for ':')
- -d:c/n Delete chars from position c to position n.
- (the '/' can be replaced for ';')
- -i:c,"text" Insert text starting at position ccc.
- The text to be inserted can be delimited by:
- "..", '..', [..], (..) or {..}
- ^x will be replaced by Cntl-x
- (x can be any char from @ to _)
- #ddd will be replaced by the corresponding
- ASCII character
- (ddd must be exactly 3 digits in the
- range 000-255)
- To insert a '^', '#', '\' or a delimiter
- precede it with a '\'
- -lc Translate resulting data to LowerCase.
- -uc Translate resulting data to UpperCase.
- -b Change strings of consecutive blanks to one
- blank
- -u Delete line if identical to previous one
- (Unique).
- -cf File with commands as described above but
- one per record.
-
- NOTE: The delete/insert operations can't exceed 10.
-
-
-
-
-
-
-
-
- 8
-
-
-
-
-
- This is the help screen of the program Fields
- (sligthly reformated to fit the 60 columns of this manual)
-
- Fields.01.02 - 01/Feb/91 - (c) 1990, 1991 SoftWare Plus SA -
- Eduardo J. Salom
-
- usage: fields [-d:<delims>] -f:<fields> [-uc] [-lc] [-u] \
- [<]InputFile [[>]OutputFile]
- or: fields -cf:<CommandFile> [<]InputFile [[>]OutputFile]
- where:
- -d:<list of delimiters>
- A serie of characters to be used as delimiters.
- If this parameter is omitted the default delimiters
- will be the Space (#032) and the Tab (#009).
- To include the space or any control code you must
- supply its ASCII value preceded by a # sign: #ddd
- will be replaced by the corresponding ASCII
- character. ddd must be a number exactly 3 digits
- long in the range 000 to 255
- -f:<list of fields>
- The individual fields or range of fields to be
- included, separated by commas.
- Range of fields are individual fields separated by
- a dash.
- -f:-3,5-7,9- will include all fields 1 to 3 (-3),
- 5 to 7 (5-7) and from field 9 up to
- the last one (9-).
- Each field can be followed by a : and the output
- field length.
- Fields longer than specified will be truncated,
- while shorter ones will be padded with spaces.
- *Only* for individual fields!
- -lc Translate resulting data to LowerCase.
- -uc Translate resulting data to UpperCase.
- -u Delete line if identical to previous one (Unique).
- The checking will be done after the Output line was
- built
- -cf File with commands as described above but one per
- record.
-
-
-
-
-
-
- 9
-
-
-
-
-
- This is the help screen of the program Lines
- (sligthly reformated to fit the 60 columns of this manual)
-
- Lines.01.04 - 12/Feb/91 - (c) 1990, 1991 SoftWare Plus SA -
- Eduardo J. Salom
-
- usage: lines -s:<mask> [-i] -{f|t|o} [[<]InpFile] \
- [[>]OutFile]
- where:
- -s:<mask> where <mask> can be any string without embedded
- blanks
- if preceded by ^ will look only the first word of
- each line
- if terminated in ^ will look only the last word of
- each line
- if preceded by * will look for words terminated as
- <mask>
- if terminated in * will look for words starting as
- <mask>
- To cancel the special significance of ^ or *
- duplicate it
- i.e.: -s:^Fro* means: 'look for a line where its
- first word starts with the characters Fro'
- -s: (with a null mask) will search for empty
- lines
- -i The search must be done case insensitive
- -f Send to output all lines once <mask> found (from)
- -t Send to output all lines until <mask> found (to)
- -o Send to output all lines where <mask> found (only)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 10
-
-
-
-
-
- This is the help screen of the program Tail
- (sligthly reformated to fit in 60 columns)
-
- Tail.01.02 - 23/Nov/90 - (c) 1990, 1991 SoftWare Plus SA -
- Eduardo J. Salom
-
- usage: tail -n [-lf:LogFile] [<]InpFile [[>]OutFile]
- where: n is the number of lines to send to the output
- file
- LogFile can be a file used to log the control info
- provided by the program. If you redirect (or pipe)
- the Output the control info will not be redirected
- along with the data.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 11
-
-
-
-
-
- This is the help screen of the program Head
- (sligthly reformated to fit the 60 columns of this manual)
-
- Head.01.01 - 23/Nov/90 - (c) 1990, 1991 SoftWare Plus SA -
- Eduardo J. Salom
-
- usage: head -n [-lf:LogFile] [<]InpFile [[>]OutFile]
- where: n is the number of lines to send to the output
- file
- LogFile can be a file used to log the control info
- provided by the program. If you redirect (or
- pipe) the Output the control info will not be
- redirected along with the data.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 12
-
-
-
-
-
- Bug reports, questions about these programs as suggestions
- for enhancements or for developing new programs will be wel-
- comed.
-
- As my native language is Spanish any correction to my
- English as suggestions to improve the readability to this
- manual will be also welcomed.
-
- You can send me e-mail to the following addresses:
- Internet: eduardo@swp.com.ar <== prefered
- or eduardo@m2xenix.psg.com
- UUCP: ..!uunet!swp.com.ar!eduardo <== prefered
- or ..!uunet!m2xenix!eduardo
- CompuServe: [73000,74]
- BIX: swp
- Delphi: SWP
-
- or AIR MAIL (surface mail will took 2 to 3 months) to
-
- Eduardo J. Salom
- SoftWare Plus SA
- Larrea 1218 - 2.A
- (1117) Buenos Aires, CFE
- Argentina
-
- The main and only activity of my company (SoftWare Plus) is
- the software development, our earnings depends of our sales,
- we believe that the shareware is a great idea as the user
- can test the product before paying for it saving, at the
- same time, the big chunk spent in advertising, packaging and
- distribution (about 70% of the retail price of a commercial
- product)
-
- So, if you find this program, or any other shareware, useful
- and keep using it please, register as user an pay for it,
- otherwise the shareware will starve and dissapear.
-
- Think that the few bucks I request will pay only for a very
- little fraction of the time spent to make this program.
-
- Thanks for you attention!
-
- Eduardo J. Salom
-
-
- 13
-