×
Create a new article
Write your page title here:
We currently have 3,189 articles on s23. Type your article name above or create one of the articles listed here!



    s23
    3,189Articles
    Revision as of 21:49, 11 November 2003 by imported>DrOwl
    (diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

    Sed A Stream Editor


    Sed is a "non-interactive" stream-oriented editor. It is stream-oriented because, like many UNIX programs, input flows through the program and is directed to standard output. (vi, for instance, is not stream-oriented. Nor are most DOS applications.) Input typically comes from a file but can be directed from the keyboard. Output goes to the terminal screen by default but can be captured in a file instead. Sed works by interpreting a script specifying the actions to be performed.


    Examples

    to change all instances for "OldString" with "NewString"
    
       cat file.txt | sed ' {s/OldString/NewString/g} ' > newfile.txt
    
    s = Substitute , g = Global
    
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.