ied.1 (2010 09)
i
ied(1) ied(1)
# Sends nothing to the application, but inserts the line in the history (useful for
adding comments to history file).
ESC,*,= (File name expansion). Not supported.
@ Macro expansion. Not supported.
Note however that
ksh has a rarely-used function
_ that substitutes words from the
previous line (this is not the macro
$_
, but rather an editor command). If a preced-
ing count is given, it uses the count th word of the last line. This is much more use-
ful with
ied.
In
emacs/gmacs mode:
M-*, M-=, M-ESC
(file name expansion) Not supported.
Note that the command
M-. (and its synonym
M-_) provide the same functionality
as the
vi mode _ command.
Macro expansion.
Not supported.
^O Although supported, it may not always appear correctly on the screen. The
ˆL
command can be used to redraw the line. See below for the discussion on prompt-
ing.
EXAMPLES
Add interactive editing to the
bc command:
ied bc
Execute vi on testfile using comands taken from script:
cat script | ied -i -t vi testfile
Note that, without the use of ied, vi would misbehave because its standard input would not be a termi-
nal device. In this case, the -t is not required because vi puts itself in raw mode, but for an application
that does not, -t might be required.
The command line
ied -i -t grep ’ˆx:’ data_file | tee x_lines
searches the file data_file for lines beginning with x:, sending one copy to the terminal and a second
to file x_lines, just like the command line
grep ’ˆx:’ data_file | tee x_lines
The difference is that in the command line without ied, grep writes directly to a pipe, and thus buffers
its output. If data_file is very large and not many lines match the pattern, output to the terminal is
delayed. By using ied, the output of grep goes to a pty instead, which causes grep to output each line
as it is ready.
WARNINGS
Since
ied cannot know everything about every application, it is possible that it can become confused,
with either the timing or the prompt being out of phase with the application. Since the use of ied is
never required, it is the user’s choice to determine whether the application is more usable with or without
ied. In general, however, programs that do not confuse ied are usually also the most likely to benefit
from its use.
ied tries to intuit the currently active prompt when it is not providing one itself. However, this is not
always successful. Even when it is successful, the timing of ied and the serviced command may occa-
sionally confuse the output. The ˆL commands in both emacs and vi modes redraw the edit line in a
consistent fashion that can be used to create the next command.
AUTHOR
ied was developed by HP.
SEE ALSO
bc(1), bs(1), csh(1), ex(1), grep(1), ksh(1), vi(1), printf(3S).
HP-UX 11i Version 3: September 2010 − 3 − Hewlett-Packard Company 3