Open and Shut for Instant Access
Only Qedit files can be opened and shut. It is much faster to use the Open command than it is to use the Text command, because you make changes directly to the Open file. With a Text file, you must wait for Qedit to make a copy to which you make your changes.
Using the Shut command saves the current scratchfile as a permanent Qedit workfile. In the case of a scratchfile, the name of the new workfile must not exist. You can Shut a new file, or a file that you made a copy of (with the Text command). Name the file as described above.
If you are working on a Qedit workfile, Qedit renames it before closing.
qux/t myfile1
'Language' is now DATA
{copy of myfile1 in scratchfile}
20 lines in file
qux/sh myfile1
Retained existing file for you.
{myfile1 already exists. No change.}
qux/sh myfile1.work
{renamed to myfile1.work}
qux/open *
Open /home/user1/myfile1.work Current = 1 Margins = 1/80
qux/sh myfile1.newwork
File renamed.
A workfile looks like any other file from the outside. For example,
ll myfile1*
-rw-rw-rw- 1 francois users 533 Aug 17 18:33 myfile1
-rw-rw-rw- 1 francois users 16384 Dec 8 07:15 myfile1.work
However, you can use the HP-UX file
command to determine the file type. In order for file
to recognize Qedit files, you need to edit /etc/magic
.
login as root
$ cd /etc
$ qedit
qux/Text magic
qux/Add last
0\tstring\tQEDIT\tQedit
{\t indicates tab characters}
//
qux/Set Decimal On
qux/Change "\t" '9 *
{change \t to actual tab characters}
qux/Keep
You can now use the file
command on these files.
$ file myfile1*
myfile1: ascii text
myfile1.work: Qedit