ex, short for EXtended, is a
line editor
In computing, a line editor is a text editor in which each editing command applies to one or more complete lines of text designated by the user. Line editors predate screen-based text editors and originated in an era when a computer operator typic ...
for
Unix
Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, an ...
systems originally written by
Bill Joy
William Nelson Joy (born November 8, 1954) is an American computer engineer and venture capitalist. He co-founded Sun Microsystems in 1982 along with Scott McNealy, Vinod Khosla, and Andy Bechtolsheim, and served as Chief Scientist and CTO at ...
in 1976, beginning with an earlier program written by Charles Haley. Multiple implementations of the program exist; they are standardized by
POSIX
The Portable Operating System Interface (POSIX) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines both the system- and user-level application programming inter ...
.
History
The original Unix editor, distributed with the
Bell Labs versions of the operating system in the 1970s, was the rather user-unfriendly
ed. George Coulouris of
Queen Mary College
, mottoeng = With united powers
, established = 1785 – The London Hospital Medical College1843 – St Bartholomew's Hospital Medical College1882 – Westfield College1887 – East London College/Queen Mary College
, type = Public researc ...
, London, which had installed Unix in 1973, developed an improved version called em in 1975 that could take advantage of
video terminals.
George Coulouris: Bits of History
/ref> While visiting Berkeley, Coulouris presented his program to Bill Joy
William Nelson Joy (born November 8, 1954) is an American computer engineer and venture capitalist. He co-founded Sun Microsystems in 1982 along with Scott McNealy, Vinod Khosla, and Andy Bechtolsheim, and served as Chief Scientist and CTO at ...
, who modified it to be less demanding on the processor; Joy's version became ex and got included in the Berkeley Software Distribution.
ex was eventually given a full-screen visual interface (adding to its command line oriented operation), thereby becoming the vi text editor. In recent times, ex is implemented as a personality of the vi program; most variants of vi still have an "ex mode
Mode ( la, modus meaning "manner, tune, measure, due measure, rhythm, melody") may refer to:
Arts and entertainment
* '' MO''D''E (magazine)'', a defunct U.S. women's fashion magazine
* ''Mode'' magazine, a fictional fashion magazine which is ...
", which is invoked using the command ex
, or from within vi for one command by typing the :
(colon) character. Although there is overlap between ex and vi functionality, some things can only be done with ex commands, so it remains useful when using vi.
Relation to vi
The core ex commands which relate to search and replace are essential to vi. For instance, the ex command replaces every instance of with , and works in vi too. The means every line in the file. The 'g' stands for global and means replace every instance on every line (if it was not specified, then only the first instance on each line would be replaced).
Command-line invocation
Synopsis
ex rR -v c ''command'' t ''tagstring'' w ''size'' 'file''...
Options
; -r : recover specified files after a system crash
; -R : sets readonly
; -s : (XPG4 X/Open group (also known as the Open Group for Unix Systems and incorporated in 1987 as X/Open Company, Ltd.) was a consortium founded by several European UNIX systems manufacturers in 1984 to identify and promote open standards in the field of in ...
only) suppresses user-interactive feedback
; -v : invoke visual mode (vi)
; -c ''command'' : Execute command on first buffer loaded from file. May be used up to ten times.
; -t ''tagstring'' : Edit the file containing the specified tag
; -w ''size'' : Set window size
; - : (obsolete) suppresses user-interactive feedback
; -l : Enable lisp editor
A lisp is a speech impairment in which a person misarticulates sibilants (, , , , , , , ). These misarticulations often result in unclear speech.
Types
* A frontal lisp occurs when the tongue is placed anterior to the target. Interdental lisping ...
mode
; -x : Use encryption when writing files
; -C : encryption option
; ''file'' : The name(s) of the file(s) to be edited
See also
*List of Unix commands
This is a list of Unix commands as specified by IEEE Std 1003.1-2008, which is part of the Single UNIX Specification (SUS). These commands can be found on Unix operating systems and most Unix-like operating systems.
List
See also
* List of G ...
References
External links
*
{{DEFAULTSORT:Ex (Text Editor)
Standard Unix programs
Unix SUS2008 utilities
Unix text editors
Line editor