Bug #392
Sed -i Not Working on FreeBSD
Description
While doing some common administration with the sed command line tool on FreeBSD, I found that the normal sed command would not work:
sed -i 's/changing/changed/g' /path/to/files/*
- I found a workaround on the FreeBSD forums that suggested the syntax should look more like the following:
find . -type f -exec sed -i "" 's/changing/changed/g' {} \;
- To use sed on a single file:
sed -i '' -e 's/replace/textreplace/g' /path/to/file.txt