HP NonStop G-Series User Manual
Page 173
![background image](/manuals/397048/173/background.png)
PUT Command
EDIT Command Summary
4–94
058061 Tandem Computers Incorporated
Examples
Copying All or Part of the Current File Into a New File
1.
The command:
*PUT PUPPY !
*
copies all of the current file into a new file named PUPPY. If a file
named PUPPY already exists, the existing file is purged and a new file
is created.
2.
The following command copies lines containing the string JACK within
the range of lines 100 through 1000 into a new file named HORNER.
The lines copied to HORNER retain their original line numbers:
*PUT HORNER "JACK" RANGE 100/1000
*
Creating a New, More Compact Current File
1.
As you make modifications to an EDIT file, EDIT copies the modified
lines of text into a new area in the disk file. EDIT can reuse portions of
the disk file that have been obsoleted as a result of editing. However,
portions of the file that are obsolete often remain and take up space on
the disk.
You use the QUERY command to determine the percentage of an EDIT
file that is unused. If the unused portion (SLACK) is greater than 40%,
you should use two PUT commands to compress the file. The first PUT
command compresses the file. The second PUT command maximizes
the compression. (See “Compressing Space in an EDIT File” in Section 6
for an example of the QUERY and PUT commands.)