3 ms·
And then you have a script that needs to run on a mac as well and you can either fight that the people will install the gnu version or you just rewrite your one
by wink 8y ago
And then you have a script that needs to run on a mac as well and you can either fight that the people will install the gnu version or you just rewrite your one-liner in perl.
I'm not a huge fan of perl but I've been writing my one-liners in it for a few years now and I've had less problems with portability.
- ilovetux 8y agoI would use another language for distributing a script (probably) python. Awk and sed I use more on a one-off basis although I do have a list of ones I use frequently.
- masukomi 8y agoWould that be the deprecated 2.x with OS X or 3.x which has been available for years? To put it another way, you've replaced sed incompatibility with python incompatibility. It's not really a win. I'm not saying Perl is the best choice here, but it's a better choice than Python for cross platform compatibility.