Script Commands

In general, all commands end with a colon(:) and a space

INPUT FILE:

Identifies the file to be used as input data. In general this is a copy of the log file. The file must be of type text and its name must end with .txt. File names must either be fully qualified (i.e. Start with the drive letter and show the full path to the file.) or they must be in the same directory as the program.

Example: INPUT FILE: equal.txt

OUTPUT FILE:

Identifies the name of the file to be created to hold the output. This file will hold selected lines from the input file. The file name must end in .txt. File names must either be fully qualified (i.e. Start with the drive letter and show the full path to the file.) or they must be in the same directory as the program.

Example: OUTPUT FILE: zzzout.txt

SEPARATOR:

Tells what character is used in the input log file to separate fields. Since a space is the most common separator, omitting this command tells the program to use a space. The specification of a tap is shown in the example. Any other separator is written between two slashes.

Example: SEPARATOR: /T/

FIELD:

Specifies which field to search for a pattern match. You have to figure this out by looking at the log file.

Example: FIELD: 5

MATCH:

Gives the pattern that the program is to look for. In this case the program will look for any log entry in field 5 which includes the text "sample."

Example: MATCH: sample
Example: MATCH: .gif

UPPER OR LOWER:

Makes the search case insensitive (i.e. the match doesn't care about the case of letters. Leave this line out if you want an exact match including case. This command has no information after the colon.

Example: UPPER OR LOWER:

 

REMOVE IF MATCH:

If there is a pattern match, this log entry will NOT be written to the output file. Omit this command to save the line if there is a pattern match. Note: These options are exclusive to each other. This command has no information after the colon.

Example: REMOVE IF MATCH:

 

Sample Script

 

INPUT FILE: equal.txt
OUTPUT FILE: zzzout.txt

 

SEPARATOR: /T/
FIELD: 5
MATCH: sample
UPPER OR LOWER:

ERASE WHEN WRITING: