sed

stream editor for filtering and transforming text

Find and replace strings in OSX

copy
10
1
Find and replace strings in OSXsed -i "" 's/find/replace/g' views.py

1 year ago george 3 |

Result:

find and replace, the string "find" with the string "replace" in views.py in osx

Options:

  • sed -i, sed --in-place
    -i[SUFFIX], --in-place[=SUFFIX] edit files in place (makes backup if extension supplied)