Browse Prior Art Database

Delete Line Utility Computer Program

IP.com Disclosure Number: IPCOM000122444D
Original Publication Date: 1991-Dec-01
Included in the Prior Art Database: 2005-Apr-04
Document File: 3 page(s) / 108K

Publishing Venue

IBM

Related People

Beaton, CB: AUTHOR

Abstract

Described is a utility computer program called DEL_LINE which is designed to selectively delete line(s), to insert line numbers before line(s), and to count lines in a file.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Delete Line Utility Computer Program

      Described is a utility computer program called DEL_LINE
which is designed to selectively delete line(s), to insert line
numbers before line(s), and to count lines in a file.

      The DEL_LINE utility program is designed to operate in the disk
operating system (DOS) environment and is intended to function
primarily as a tool for developers and testers. It provides a means
of creating new files containing edited information based on
indicated line numbers. It allows the user to delete specified lines
in a file without knowing in advance where the line is.  The utility
program takes a text file for input and provides three functions as
follows:
   1) Selectively delete one or more contiguous input lines, anywhere
in the file,
   2) Insert line numbers before the beginning of each line, and
   3) Count the total number of lines in a file.

      Each of the three of these functions is useful in situations
where automation is needed, as the majority of the PC-DOS commands
are tested via lengthy batch files that run by themselves.  For
example, if a testcase developer wanted to use a text file for input
but needed the last five lines "stripped away," but the batch file
doesn't know the length of the file, the user can use DEL_LINE to
count the lines, then can delete those last five lines.

      The output goes to the screen (STDOUT), but can be redirected
into a new file, which will have the desired effect of removing the
lines.  This tool can be downloaded with your testcase, or copied
from TOOLCTL and the \DEL_LINE directory.  This text file and the
source code are there too.  The following illustrates the syntax of
the utility:
                 SYNTAX:

      The utility takes an input file and deletes line(s) from it.
The user specifies a filename, number, or a number followed by a
space and another number, and the tool will read in the file and
display the file back onto the screen, except for the line(s) that
were stipulated on the comm line, which are the next two parameters
after DEL_LINE Filename.ext.  For example, if the user specifies
DEL_LINE Filename.ext 5, it will delete the fifth line, and if the
user enters DEL_LINE Filename.ext 5 8, it will delete the fifth
through the eighth line.  The results go to STDOUT to be redirected
into a file.  The input file can be up to 250 lines.

      The user can use three optional parameters as follows:
     - /B option will leave blank space(s) in the spot where a line
used to be, when displaying file to the screen.  For example, if the
user enters DEL_LINE A: CONFIG...