You can run AIX commands either by putting the file you are editing on hold while the command runs or by running the command in a box. Filters are programs that take standard input, transform it in some way, and write to standard output. For example, you can use filter commands to replace specified text in a paragraph or file or to sort text into alphabetic or arithmetic order.
You can use the following procedures with INed editor subcommands:
The editor displays the New Task menu. The New Task menu lets you run operating system commands without leaving the editor.
If you select the Execute AIX shellcommands option, the editor displays the message Saving file (the wording of this message may vary) and displays a shell prompt. Enter an operating system command or commands at the shell prompt. Press the Ctrl-D key sequence (the shell command to exit) to resume editing.
If you select Run an AIX Shell Command within a Box option, the editor displays the Shell command box. Type an operating system command in the box and press the Ctrl-A, Enter key sequence (the Execute function). The editor displays the message Executing and, when the command completes, displays the results of the operating system command in a box. If the command has no output, the editor displays the message No output.
Note: You can also run an operating system command in a box by pressing the Ctrl-A, Enter key sequence (the Enter function), typing the command in the ENTER box, and pressing the F2 key (the Menu function). The editor displays the message Executing (the wording of this message may vary) and displays the results in a box.
Filters are commands that change files. For example, the rpl command is the INed editor filter command to replace text in a file. Some other useful operating system filter commands are the nl, sort, and tr commands. You can also use many other operating system commands as filters. For more information on commands, see Editor Commands.
The editor uses the following conventions when it runs a filter command:
Note: Some keyboards have Break engraved on the top of a key. This key does not necessarily issue the Break function.
To sort numerically, type the following in the ENTER box:
sort -nThe sort command has other flags that you can use to sort lines.
Press the Ctrl-A, X key sequence (the Do function).
The editor displays the sorted lines in ascending or arithmetic order.
rpl OldText NewTextwhere OldText is the text you want to replace and NewText is the new text.
To replace text by paragraphs or by lines, type the following in the ENTER box:
Number rpl OldText NewTextwhere Number is either the number of paragraphs or the number of lines you want to search, OldText is the text you want to replace, and NewText is the new text.
Text can consist of either one word or a phrase. For example, you can replace the word priority with the phrase order of importance. Use the following guidelines when you type text for the rpl command:
rpl ski sky
rpl sky "blue sky"
rpl "blue sky" ""
551 rpl "blue sky" "gray sky"
The cat command, nl command, rpl command, sort command, tr command in AIX Version 4.3 Commands Reference.
INed Overview introduces general concepts about the INed editor, lists the INed editing functions and describes the system guidelines for using the INed editor.
INed Editor Functions for the Standard Keyboard is a table that shows the INed editor command keys on a standard keyboard.
INed Editor Files in AIX Version 4.3 Files Reference contains reference information about the files used by the INed editor.
Editor Commands contains a list, with brief descriptions, of the editor commands.