edit Command Purpose Provides a simple line editor for the new user. Syntax edit [ -r ] [ File ... ] Description The edit command starts a line editor designed for beginning users, a simplified version of the ex editor. The edit editor is part of a family of editors that includes the ed editor, ex edi- tor, and vi editor. Knowing about the edit editor can help you learn the more advanced features of the other editors. To edit the contents of a file, enter: edit File When File is the name of an existing file, the edit command copies it to a buffer and displays the number of lines and char- acters in it. Then it displays a : (colon) prompt to show that it is ready to read subcommands from standard input. If the file named in the parameter File does not already exist, the edit com- mand indicates this and creates the new file. You can give more than one file name for the File parameter, in which case the edit command copies the first file into its buffer and stores the remaining file names in an argument list for later use. The edit editor does not make changes to the edited file until you use the w subcommand to write the changes. Flags -r Recovers the file being edited after an editor or system mal- function. Implementation Specifics This command is part of Base Operating System (BOS) Runtime. Related Information The ed or red command, ex command, vi or vedit command. Editors Overview in AIX Version 3.2 Editing Concepts and Pro- cedures introduces general concepts about editors and describes the main AIX editors. ================================================================= ================================================================= edit Subcommand for the dbx Command Purpose Starts an editor on the specified file. Syntax edit [ Procedure | File ] Description The edit subcommand invokes an editor on the specified file. The file may be specified through the File parameter or by specifying the Procedure parameter, where the editor is invoked on the file containing that procedure. If no file is specified, the editor is invoked on the current source file. The default is the vi ed- itor. Override the default by resetting the EDITOR environment variable to the name of the desired editor. Note: The edit subcommand can be executed only while running the dbx or the xde debug program. Examples 1. To start an editor on the current source file, enter: edit 2. To start an editor on the main.c file, enter: edit main.c 3. To start an editor on the file containing the do_count() pro- cedure, enter: edit do_count Related Information The dbx Symbolic Debug Program Overview in AIX Version 3.2 Gen- eral Programming Concepts. The list subcommand for the dbx command. The vi or vedit command. List of dbx Subcommands in AIX Version 3.2 General Programming Concepts. Displaying the Current File in AIX Version 3.2 General Program- ming Concepts. Changing the Current File or Procedure in AIX Version 3.2 Gen- eral Programming Concepts.