Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Use Python for Scripting (hypirion.com)
3 points by todsacerdoti 5 days ago | hide | past | favorite | 5 comments




The arguement appears to be: use python because bash is different across Linux and Mac. Fair enough, but ignores windows where python is not already there.

Personally though at the point where you need a true cross platform scripting language in the shell I'd just install something like powershell or nushell.


It's not that bash is different across platforms (it's not different) -- it's that utils like sed/grep/awk are different because Linux has the GNU variety, whereas Mac has the BSD variety. In practice though, it's not all that hard to make it work across both.

Due to not shipping GPL3 code, the version of Bash on macOS is 3.2 and sometimes that makes a difference.

>the point where you need a true cross platform scripting language in the shell

... When does this happen, anyway? When I am in a "scripting" mindset, it's because I want to enhance my machine, not publish software. If I am thinking about "cross platform" then I am also thinking in terms of "programming" and "development".

(And, you know, awareness of "the shell" is probably a lot lower among Windows users than Linux and Mac.)


Since we're going with anecdotes it has happened with me. An example is my cross platform backup script sitting on my external harddrive. Write once run everywhere. Also the reason I like dart/flutter.

I think you're correct about windows users in general but if a user is likely to script in python I'm fairly certain they'll be aware of the shell. And the shell in windows is massively powerful with powershell.

Either way both powershell and nushell are cross platform meaning their scripting are too, unless you're doing something OS specific.




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

Search: