Hold Command [HO]

Qedit 5.7 for HP-UX

Home Previous Next


Hold Command [HO]

Lets you explicitly write lines to the Hold file.

HOLD [ filename ] [ rangelist ]

(Default: hold current line)

(Q=hold without display)

(J=append, without erasing)

You can refer to the current contents of the Hold file by the actual file name, "hold", in any of the commands that access external files (Add-File, List, Use).

Examples

/hold 50/60        {erase Hold, hold lines}
/holdj 100/198     {append more lines to Hold}
/ho "direct"       {hold lines with string}
/open abc.src
/add 33=hold       {adds held lines to abc.src}
/holdq /etc/profile
/list hold

Implicit Hold

When using the Add command to move or copy lines within a file, Qedit overwrites a file named Hold0 with a copy of the lines. It counts the lines and tries to select a line number increment that will accommodate the number of lines being added to your workfile. So, if the command fails or if you wish to copy the same lines again, you can refer to the Hold0 file. Adding from an external file also holds the lines if you specify a rangelist for the file, and if the file is not the Hold file itself.

/add 55=hold0
/list hold0         {the Hold file is temporary}

Notes

By default, the Hold files are created in /var/tmp (/usr/tmp is the default on older versions of HP-UX). If you want to keep your Hold files in a different location, you can enter the new path name in the TMPDIR environment variable.

TMPDIR=/home/user1/tmp
export TMPDIR

The file name starts with "qhold" and ends with a random string of characters. The Hold0 file ends with ".0". Keep in mind that Qedit works with absolute filenames and these names can not have more than 240 characters.

Every time you use "hold" or "hold0" by themselves as a file name in any command, Qedit replaces the word with the fully-qualified file name of the appropriate Hold file.

/Add 1=hold

translates to

/Add 1=/var/tmp/qholdDAAa05429.0


Home Previous Next