Commands in Ed Dreamverse's online help for ed isn't very robust. This list of commands may help you use ths critical application.
<ed filename>: Opens a file for editing and places you in the first line Commands while in viewing mode Viewing
mode refers to when you have a file opened in ed but have not yet started editing it. You may move around through the file in order to find the place you wish to edit, or simply to see how something was
coded. You will need to enter input mode before you can change the file. After making changes, you need to return to viewing mode in order to save or exit ed. <.
>: Displays the current line of code <[enter]>: Procedes to the next line of code and displays it <->:
Displays the current line of code <c>: Overwrites the current line of code and puts you in input mode. You will lose whatever line you are currently
viewing, so you may have to retype it. <i>: Inserts code in the line(s) above the line you are viewing and puts you in input mode. This does not erase any
lines of code. <a>: Appends code in the line(s) below the line you are viewing and puts you in input mode. This does not erase any lines of code. <d>: Deletes the current line of code. Be sure to use the <.> command immediately after using <d> in order to see what line you're on before deleting anything else!
<q>: Exits ed. This command will return an error if you have made changes to the file, in which case you will need to use either the <Q> or <x>
commands <Q>: Exits ed and discards all changes <x>: Exits ed and saves all changes Commands while in input mode Input mode refers to when you have opened a file and used the <c>, <i>, or <a> commands to enter input. While in input mode, anything you type
will be entered into the file. Ed precedes each line with an asterisk (*) to let you know you are still in input mode. The following commands work in input mode. <[enter]>: Enters the code you have typed on the current line and procedes to the next line. <.>: When entered on a blank line, this
returns you to viewing mode. You must do this in order to save or exit ed. |