Was this page helpful?

Replace text in multiple files

    Table of contents
    No headers

    If you want to replace a string of text found in multiple files with another, use this command:

     

    sed -i 's/foo/foo_bar/g'  *

     

     

    Where foo is the text you want replaced by foo_bar.  The asterisk would represent all files in the current directory.

    Was this page helpful?
    Tag page (Edit tags)
    • No tags
    You must login to post a comment.
    Powered by MindTouch Core