PIPELEN

PURPOSE   OPERATION   OPTIONS   COMMAND LINES   RELATED PROGRAMS


Author: Dan Mares, dmares @ maresware . com
Portions Copyright © 1998-2021 by Dan Mares
Phone: 678-427-3275
Last update: March 24, 2020

top

PURPOSE

The pipelen program is designed to read a file which has fields delimeted by pipes (|), or tabs and produce an output file showing the maximum length of each of the fields found. This output file can then be used to create a parameter file for the pipefix program which will take the input file and make each field a fixed length. This fixed length record can now be processed by any number of other maresware programs.

Since most forensic software generally outputs its data listings (usually a list of files processed) in a variable length delimited (|) file, this program processes those files and advises how to use pipefix to create fixed length output files. Since maresware, in most cases, requires input files to be of a fixed length, the process of pipelen, followed by pipefix, followed by the appropriate maresware program can produce required results.

The MAIN caveat being that the last character of the record NOT be the delimeter. Meaning the last field must not be empty, and the record end with the delimeter (|).
The MAIN caveat being that the last character of the record NOT be the delimeter. Meaning the last field must not be empty, and the record end with the delimeter (|).

Not Allowed , field 3 as the last field, ends in a pipe (|)
FIELD1  |  FIELD 2  |  FIELD 3 ends with a pipe |
Accepatable: EOR item indicates end of the record for display only
FIELD1  |  FIELD 2  |  FIELD 3 ends with a pipe EOR

top

OPERATION

To run the program, simply run the command (in a command box) providing it the input filename and an output filename. If the delimeter is not a pipe or a tab, then a command line option is required.

The program reads each record and parses it at the delimeters. It counts the number of characters in each field, and maintains the length of each field. Keeping the maximum field length for each field in memory. At the end of reading the input file, it creates an output, stating the maximum length that was found for each field of the input file.

The contents of the ouput file can then be used to create a parameter file for the pipefix program. Each line of the parameter file is a number indicating how long you wish each field to be. The resulting file output from pipefix will be fixed length records each with fields of fixed lengths.


top

COMMAND LINE

c:>pipelen  input_filename  output_filename

c:>pipelen  input_filename  output_filename  [options -d "character" ]


top

OPTIONS

-d + delimiter:  If the input file is pipe delimited, then the -d option is not needed. If the input file is not pipe delimited, indicate what delimiter to use in one of the following formats.

Enter the delimiter as a single character. It may be necessary to quote “|” the character if the character has a special meaning to DOS. As DOS may not pass it directly to the program. If the character is not a special DOS character merely enter it. Be especially careful if the file is “,” comma delimited. As some fields may also have imbedded commas which will give bad results.

If you need to enter a delimiter that is not printable, say for instance the tab character (hex 09) is used as a delimiter then you can enter the ascii value of the delimiter. This must be entered as either a 2 or 3 digit number. So single digit numbers like 9 (tab) must have a leading 0. This would look like -d 09.


RELATED PROGRAMS

Pipefix: make each delimeted field a fixed length.

top