home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
desktop
/
cpt-102.arj
/
CUTPASTE.MAN
< prev
next >
Wrap
Text File
|
1992-03-20
|
9KB
|
259 lines
┌───────────────────────────────────────────────────────┐
│ │
│ │
│ │
│ │
│ U S E R S G U I D E │
│ │
│ │
│ CUTPASTE command version 1.00 │
│ │
│ │
│ February 16, 1992 │
│ │
│ │
│ │
│ │
│ │
└───────────────────────────────────────────────────────┘
WHAT IS "CUTPASTE"?
CUTPASTE is a utility for reformatting text lines. That is,
it retains the desired portions of a text line and removes the
excess. It will also allow text to be rearranged as needed and
paste in additional text specified in the command line.
WHY "CUTPASTE"?
CUTPASTE (and like utilities) is intended for use with
databases, where record lengths are usually fixed and specific
information is in the same position in every record. It is a
simple and efficient way to format information for reports or
screen display. As will be demonstrated, it has other uses as
well (see "rmlist.doc" included with this package).
IF THERE ARE "LIKE" UTILITIES, WHY "CUTPASTE"?
CUTPASTE is shareware. Most "like" utilities are not.
CUTPASTE came about as the result of my having devised a method
for deleting large numbers of files from my hard disk with
minimum effort. I could not share this method with others
because it involved the use of a licensed cut and paste utility
from one of the "big guys". CUTPASTE is also only 1/4 the size
of the "big guy" utility I WAS using.
CAN I USE "CUTPASTE" WITH MY DATABASE?
CUTPASTE can be used with your database if the records are
stored in DOS TEXT format. If the records are not stored in DOS
TEXT format, results of running the CUTPASTE command on your
files will be unpredictable and probably not what was intended.
If you are not sure of your file format, experimentation is
a quick, safe way to find out. CUTPASTE will not alter the
original file in any way.
If your data is not in DOS TEXT format, your database may
have a built in text conversion facility such as accompanies most
better word processing and spreadsheet software. Check your
manual for information and instructions regarding conversion to
DOS TEXT format.
Future versions of CUTPASTE may support specific database
record formats if user feedback indicates that this is desirable.
WHAT WILL "CUTPASTE" DO?
CUTPASTE will read a DOS TEXT file and format each line to
the parameters specified in the calling command line. It will
retain text from the positions in the line indicated by byte
(character) position numbers or ranges. It will ignore all other
original text for the output record.
CUTPASTE will paste into each record, quoted text from the
command line that has been flagged with a "-f" switch.
Multiple iterations of flagged text, individual byte
positions or ranges are allowed in any order. Multiple
iterations of the same byte positions or ranges are allowed.
Maximum command line length is 254 bytes. This length is
the normal limit of the MS-DOS operating system. Maximum input
record length is 512 bytes. Results of reading longer records
are unpredictable. Maximum output record length is 1024 bytes.
Records will be truncated if command line options result in a
record length that exceeds this number.
If an output filename is not specified in the command line,
CUTPASTE will output to the screen (this is a good way to test
your command line).
WHAT WON'T "CUTPASTE" DO?
CUTPASTE will not alter the original data file in any way.
CUTPASTE will not allow the same file name for input and output.
CUTPASTE is case sensitive and will not accept option switches in
the wrong case. CUTPASTE will not process special record formats
in a predictable manner.
COMMAND LINE SYNTAX
cutpaste inputfilename [outputfilename] [col#] [col#-col#]
[-f"text"]
cutpaste command name
inputfilename the name of the file containing records to be
read
outputfilename the name of the file where the output records
to be written (optional)
col# a single byte to be output to the new record
col#-col# a continuous range of bytes to be output to
the new record
-f switch indicating that the following quoted
text is to be pasted into the new record
EXAMPLE COMMAND LINE
The input record:
The quick brown fox jumped over the lazy dog.
The command line:
cutpaste infile.txt outfile.txt 1-4 -f"red" 16-32 -f"a sleeping"
41-45
The output record:
The red fox jumped over a sleeping dog.
EXPLANATION OF THE COMMAND LINE
The input record would be read from the file "infile.txt".
The output record would be written to the file "outfile.txt" If
the output file name had been omitted, the output record would be
written to the screen. 1-4 specifies that bytes (characters) 1,
2, 3, and 4 ("The ") are to be written to the output record.
-f"red" indicates that the word "red" is to be pasted into the
output record after the first 4 bytes. 16-32 specifies that the
phrase " fox jumped over " (note the leading and trailing
spaces), be written to the output record after the word "red".
-f"a sleeping" instructs CUTPASTE to paste in the phrase "a
sleeping" after "over ". 41-45 specifies that " dog." from the
input record be written to the output record.
1-4 could have been specified multiple times producing "The
The The The The" which doesn't make much sense but, illustrates
that a range specification may be used more than once.
BEGGING FOR BUCKS
So, now we get down to the "nitty-gritty". Since you
probably got this from a BBS somewhere, there's no point in my
going into a long explanation of the shareware concept. You are
aware of it. Let me just say that if you use CUTPASTE and like
what it does, you should pay for it. A $15 contribution will
bring you the latest version of CUTPASTE, with any new features
(there will be some) and bug (ugh!) fixes that have been
implemented, the addition of your name to my CONFIDENTIAL mailing
list (oh boy!) and my undying gratitude. Include the desired
disk format for your upgrade (5 1/4" - 360k / 1.2 meg , 3 1/2" -
720k / 1.44 meg).
You are encouraged to upload this package to other BBS and
share it with your friends and co-workers. I ask only that you
distribute the package in its entirety. Files in the package
include:
cutpaste.man - this users guide
cutpaste.exe - the cut and paste utility
rmlist.doc - explanation of rmlist.bat
rmlist.bat - selective multi-file deletion batch
file
commands.lst - command script for MS-DOS edlin
line editor
order.frm - painless instrument for obtaining
your upgrade
Correspondence regarding problems with CUTPASTE (heaven
forbid), comments, and suggestions is also most welcome. Thanks
for your support.
Bill Leckband
1628 S. Everett Place
Kennewick, Wa. 99336
"DOS" refers to MS-DOS
MS-DOS is a registered trademark of MICROSOFT CORP.
edlin is a copyrighted product of MICROSOFT CORP.