I am using the latest busybox from git. After this commit: http://git.busybox.net/busybox/commit/?id=63f4d32c9859c1ed341debefddad4b9c0ae944cc I see strange things when use sed to replace words. Sometimes replace works, but sometimes not. For example these replace foo in file test.txt as I expect: sed -i 's/foo/bar/w' test.txt sed -i 's/foo/bar-1/w' test.txt sed -i 's/foo/t/w' test.txt sed -i 's/foo/technic-1/w' test.txt sed -i 's/foo/technical/w' test.txt But these do no replace foo: sed -i 's/foo/t-1/w' test.txt sed -i 's/foo/t-2/w' test.txt sed -i 's/foo/technical-1/w' test.txt sed -i 's/foo/TemplatesInfoBarTechnical-1/w' test.txt If I revert implement "+ N" range end commit, words replaces in all cases.
Well, /w FILE option to s/// command never worked. I fixed this. Now it works for me. If you still have a problem, please reopen and attach your test.txt