2 ms·
If you've ever seriously written shell scripts you'll know that they're not 100% portable. You always have to go through hoops to make them work properly across
by FooBarWidget 14y ago
If you've ever seriously written shell scripts you'll know that they're not 100% portable. You always have to go through hoops to make them work properly across operating systems systems. BSD and OS X come with the BSD userland tools, with the exception of bash being default on OS X. Linux comes with the GNU userland. A few differences from the top of my head:
- BSD utilities do not accept any -options after filenames, GNU utilities do.
- The situation is reversed for BSD find. It insists on accepting a directory name as the first parameter.
- BSD sed doesn't support the -i option in the same way as GNU sed does.
- Even different versions of GNU utilities are not necessarily compatible. A few years ago I ran into compatibility problems with 'head', 'tail' and even 'free' across different Linux distros. I can't remember the exact issues though.
So I agree with the grandparent, Node and Python are a lot more portable than shell scripts.
- Moto7451 14y agoAh I misunderstood the comment to mean the facility just wasn't available (being lumped in with Windows) which struck me as odd. I generally just wrap things in checks for $OSTYPE and Perl when I'm not working with the system itself.