synesthesiam / rhasspy

Rhasspy voice assistant for offline home automation
https://rhasspy.readthedocs.io
MIT License
944 stars 101 forks source link

sed -i is not POSIX compliant, instead make a temp copy and rename to… #146

Closed esdeboer closed 4 years ago

esdeboer commented 4 years ago

sed -i is not POSIX compliant and does not work on BSD/OSX.

As a workaround output the sed output to a temporary file and rename it to the original.

See https://stackoverflow.com/questions/2320564/sed-i-command-for-in-place-editing-to-work-with-both-gnu-sed-and-bsd-osx