News for hackers. Stuff that matters.
Re:Detecting the use of “curl – bash” server side (2016) by jniedrauer on Wednesday December 09, 2020 @10:34AM (#25359567)
Unless you're on MacOS, in which case it's -i''. I always have to rewrite cross platform scripts at least once.
Re:Detecting the use of “curl – bash” server side (2016) by dwheeler on Wednesday December 09, 2020 @12:27PM (#25361073)
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.
Re:Detecting the use of “curl – bash” server side (2016) by waynesonfire on Wednesday December 09, 2020 @05:51PM (#25366454)
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.