minix man page for ed

Query: ed

OS: minix

Section: 1

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

ED(1)							      General Commands Manual							     ED(1)

NAME
ed - editor
SYNOPSIS
ed file
OPTIONS
- Suppress line/byte count messages (for in scripts)
EXAMPLES
ed prog.c # Edit prog.c echo '1,$p' | ed - file # Odd way to write 'cat file'
DESCRIPTION
Ed is functionally equivalent to the standard V7 editor, ed. It supports the following commands: (.) a: append (.,.)c: change (.,.)d: delete e: edit new file" f: print name of edited file" (1,$)g: global command (.) i: insert (.,.+1)j: join lines together (.) k: mark (.) l: print with special characters in octal (.,.)m: move (.,.)p: print q: quit editor" (.) r: read in new file (.,.)s: substitute (1,$)v: like g, except select lines that do not match (1,$)w: write out edited file Many of the commands can take one or two addresses, as indicated above. The defaults are shown in parentheses. Thus a appends to the cur- rent line, and g works on the whole file as default. The dot refers to the current line. Below is a sample editing session with comments given following the # symbol. ed prog.c # Edit prog.c 3,20p # Print lines 3 through 20 /whole/ # Find next occurence of whole s/whole/while/ # Replace whole by while g/Buf/s//BUF/g # Replace Buf by BUF everywhere w # Write the file back q # Exit the editor Ed is provided for its sentimental value. If you want a line-oriented editor, try ex. If you want a good editor, use elle, elvis, or mined.
SEE ALSO
elvis(1), elle(9), mined(9). ED(1)
Related Man Pages
edit(1) - opensolaris
edit(1) - ultrix
ex(1) - ultrix
edit(1) - osf1
file::inplace(3pm) - debian
Similar Topics in the Unix Linux Community
vi editor
Need to print certain lines from a file
how to add text after a particular line on vi editor
Replace space
Edit a Huge one line file