3 ms·
Of course with sed you'd use the -i flag.
by bonoboTP 6y ago
Of course with sed you'd use the -i flag.
- jniedrauer 6y agoUnless you're on MacOS, in which case it's -i''. I always have to rewrite cross platform scripts at least once.
- dwheeler 6y agoRight. The sed -i option is incompatible between MacOS & Linux, and it isn't in the POSIX standard. The POSIX folks don't want to add it because it's possible to do work without it, even though no one wants to. Maybe sponge should be in the POSIX standard.
- waynesonfire 6y agoI ran into this on FreeBSD. I do have gnu sed and other gnu utilities installed on my Mac to help me feel more at home.