I am attempting to search through all python files recursively down into all subdirectories and replace the word organizations with organisations. Like this:-
$ find . -name "*.py" | xargs sed -i 's/organizations/organisations/g'
sed: 1: "./bookings/__init__.py": invalid command code .
But I get an error message. How do I do this right?
Ok. Figured it out. I am using Mac OSX’s
sed, which requires that I add a “” before thes/foo/foo_bar/gstring.So
worked.