Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 History  





2 Relation to vi  





3 Command-line invocation  



3.1  Synopsis  





3.2  Options  







4 See also  





5 References  





6 External links  














ex (text editor)






العربية
Čeština
Deutsch
Ελληνικά
Español
Français

Magyar
Nederlands
Polski
Русский
Suomi
Svenska
Українська

 

Edit links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


ex
Original author(s)Bill Joy
Initial releaseMarch 9, 1978; 46 years ago (1978-03-09) (as part of 1BSD)
Written inC
Operating systemUnix
PlatformCross-platform
TypeText editor

ex, short for EXtended,[1][2][better source needed] is a line editor for Unix systems originally written by Bill Joy[3] in 1976, beginning with an earlier program written by Charles Haley.[4] Multiple implementations of the program exist; they are standardized by POSIX.[5]

History

[edit]

The original Unix editor ed, distributed with the Bell Labs versions of the operating system in the 1970s, was rather user-unfriendly. George Coulouris of Queen Mary College, London, which had installed Unix in 1973, developed an improved version called em in 1975 that could take advantage of video terminals.[6] While visiting Berkeley, Coulouris presented his program to Bill Joy, who modified it to be less demanding on the processor; Joy's version became ex[7] 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", 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

[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 of XXX with YYY, 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] [-c command] [-t tagstring] [-w size] [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)
-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 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]
  • ^ "A Brief History of Vim:1976". Archived from the original on 2021-06-05. Retrieved 2021-06-05.
  • ^ ex manual page
  • ^ William N. Joy, Ex reference manual, November, 1977
  • ^ ex – Shell and Utilities Reference, The Single UNIX Specification, Version 4 from The Open Group
  • ^ George Coulouris: Bits of History
  • ^ Salus, Peter H. (2005). The Daemon, the Gnu and the Penguin. Groklaw.
  • [edit]
    Retrieved from "https://en.wikipedia.org/w/index.php?title=Ex_(text_editor)&oldid=1234338628"

    Categories: 
    Standard Unix programs
    Unix SUS2008 utilities
    Unix text editors
    Line editor
    Hidden categories: 
    Articles with short description
    Short description matches Wikidata
    Articles needing additional references from December 2012
    All articles needing additional references
    All articles lacking reliable references
    Articles lacking reliable references from June 2021
     



    This page was last edited on 13 July 2024, at 21:05 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki