Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

ex (text editor)

From Wikipedia, the free encyclopedia
Line editor for Unix systems
icon
This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Ex" text editor – news ·newspapers ·books ·scholar ·JSTOR
(December 2012) (Learn how and when to remove this message)
ex
Original authorBill Joy
Initial releaseMarch 9, 1978; 47 years ago (1978-03-09) (as part of 1BSD)
Written inC
Operating systemUnix
PlatformCross-platform
TypeText editor

ex (short forextended)[1][2][better source needed] is aline editor forUnix systems originally written byBill Joy[3] in 1976, beginning with an earlier program written by Charles Haley.[4] Multiple implementations of the program exist; they are standardized byPOSIX.[5]

History

[edit]

The original Unix editored was distributed with theBell Labs versions of the operating system in the 1970s. George Coulouris ofQueen Mary College, London, which had installed Unix in 1973, developed an improved version called em in 1975 that could take advantage ofvideo terminals.[6] While visiting Berkeley, Coulouris presented his program toBill Joy, who modified it to be less demanding on the processor; Joy's version became ex[7] and got included in theBerkeley Software Distribution.

ex was eventually given a full-screen visual interface (adding to its command line oriented operation), thereby becoming thevi text editor. In recent times, ex is implemented as a personality of the vi program; most variants of vi still have an "exmode", which is invoked using the commandex, 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

[edit]

The core ex commands which relate to search and replace are essential to vi. For instance, the ex command:%s/XXX/YYY/g replaces every instance ofXXX withYYY, 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

[edit]

Synopsis

[edit]
ex [-rR] [-s|-v] [-ccommand] [-ttagstring] [-wsize] [file...]

Options

[edit]
-r
recover specified files after a system crash
-R
sets readonly
-s
(XPG4 only) suppresses user-interactive feedback
-v
invoke visual mode (vi)
-ccommand
Execute command on first buffer loaded from file. May be used up to ten times.
-ttagstring
Edit the file containing the specified tag
-wsize
Set window size
-
(obsolete) suppresses user-interactive feedback
-l
EnableLisp editing mode
-x
Use encryption when writing files
-C
encryption option
file
The name(s) of the file(s) to be edited

See also

[edit]

References

[edit]
  1. ^vi editor history:ex
  2. ^"A Brief History of Vim:1976". Archived fromthe original on 2021-06-05. Retrieved2021-06-05.
  3. ^ex manual page
  4. ^William N. Joy,Ex reference manual, November, 1977
  5. ^ex – Shell and Utilities Reference,The Single UNIX Specification, Version 5 fromThe Open Group
  6. ^George Coulouris: Bits of History
  7. ^Salus, Peter H. (2005).The Daemon, the Gnu and the Penguin.Groklaw. Archived from the original on May 5, 2010.

External links

[edit]
The WikibookGuide to Unix has a page on the topic of:Commands
File system
Processes
User environment
Text processing
Shell builtins
Searching
Documentation
Software development
Miscellaneous
Retrieved from "https://en.wikipedia.org/w/index.php?title=Ex_(text_editor)&oldid=1315614493"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp