ed Quick Reference

From Wikistix
Jump to: navigation, search

Searching Modes

Enter command mode by entering a '.' (period) on a line by itself when in text mode. Enter text mode using any of 'a', 'i', etc.

Addressing

. current line
$ last line
n nth line
/pattern/ next match of pattern
 ?pattern? previous match of pattern
+n n lines after current line
-n n lines previous to current line
, equivalent to "1,$"
 ; equivalent to ".,$"

Sorting

'a,.!sort sort range from mark 'a' to current line

Misinformation found herein copyright Paul Ripke (aka “stix”) stixpjr@gmail.com.