Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Of course with sed you'd use the -i flag.


Unless you're on MacOS, in which case it's -i''. I always have to rewrite cross platform scripts at least once.


Right. 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.


I 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: