1

im trying to do this on an OSx Terminal

 sed -i -e 's/something/somethingelse/g' \
 -e 's/someotherthing/someothertingagain/g' \
 -e 's/multised/isfun/g' \
 file.txt

this works fine on Linux, but not on OSX. Is there a way to do this with sed on OSX, or do I have to use something else? Please help :)

1 Answers1

1

OSX sed does not work with empty extension, to override orginal file use sed -i ''.

sed -i '' -e 's/something/somethingelse/g;s/someotherthing/someothertingagain/g;s/multised/isfun/g' file.txt
sozkul
  • 665
  • 4
  • 10