5 ms·
One thing I wish Windows developers did more was bundle Busybox, a 1.6mb binary, to run shell scripts with bashisms, rather than use batch files, powershell or
by an_opabinia 5y ago
One thing I wish Windows developers did more was bundle Busybox, a 1.6mb binary, to run shell scripts with bashisms, rather than use batch files, powershell or other alternatives.
If Microsoft had only put all the PowerShell for Linux resources into Busybox.
MSYS2 is also pretty comfy. But that audience is probably better served by running WSL2.
- VWWHFSfQ 5y agoThis reminds me of a web hosting/managed colocation company I worked for back in the early 2000s. They pretty much only had unix sysadmins so basically every windows box got cygwin and activestate perl because it was really the only thing these guys knew how to use. Nobody ever bothered to learn how to script a windows machine. PowerShell was still in its infancy. But nowadays I don't think it's really appropriate to not use the platform-native tools to administer the machine. Imagine installing windows powershell on debian because you don't know how to write unix shell scripts.
- an_opabinia 5y agoPowerShell is so bad though, absolutely zero people do that. PowerShell for Linux is a straight up butt of jokes at Microsoft for having zero DAU.
- Tabular-Iceberg 5y ago> PowerShell is so bad though Care to elaborate? I’m stuck with Windows for bean counting reasons, and though I resent it I feel I would benefit from actually learning to make full use of it. But maybe it’s not worth the trouble?
- nickcox 5y agoPowerShell is great. Just objectively better than Bash for scripting. I think the lack of adoption in the Linux world is a mix of: * Cultural (i.e. it's Microsoft) * Not included out of the box * Existing tools being 'good enough'
- VWWHFSfQ 5y ago> objectively better than Bash for scripting This is a wild statement
- magila 5y agoBash scripting is so bad that being better than it is actually setting the bar rather low. The only thing more remarkable than bash's cruftyness is the number of people who have developed Stockholm syndrome towards it.
- toastal 5y agoI'm baffled sometimes that basically all of Nix is built on top of it
- wiredfool 5y agoObjectively is the new literally. Just read “in my opinion”.
- alerighi 5y agoWhy? While it’s not as good as bash or zsh as an interactive shell, for scripting it has a saner syntax, without all the weirdness that bash has. Also powershell can access basically any .net api, and thus can do things like serialise json objects built in, without learning external tools like jq.
- hnlmorg 5y ago> While it’s not as good as bash or zsh as an interactive shell That's the problem though. For me it totally sucks as an interactive shell because it's far too verbose. And if I needed to write scripts on Linux then I'm already spoilt for choice: Perl, Python, Tcl, Awk, etc are all usually pre-installed with my Linux distros. Then you can add Ruby, Go, Javascript (via Node), PHP, Rust, C++ and any .NET languages like C# into the mix too....plus many many many more. While byte streams are largely seen as a joke compared to typed pipes like in Powershell and Murex, you do have far greater compatibility with byte streams since all you're sending is bytes -- which means you can write scripts in whatever the hell you want and still use them in Bash / Zsh just fine. Then you have the 40 years of coreutils. People talk about legacy as being cruft and while there is some truth in that, there's also truth in the fact that if you need to do something in the command line, there's probably already a tool written which does it. That comes from maturity. Don't get me wrong. There is a lot I'd like to change with regards to command line usage and shell scripting (and I'm working on that ;)) but Powershell throws the baby out with the bath water. Though in fairness to Microsoft, they never quite had a mature command line prior to Powershell so there was no baby to throw out. But for Linux usage....no thanks.
- freedomben 5y agoCygwin is still utterly amazing fwiw. It's the only thing that keeps me sane in windows when WSL2 isn't able to do what I need it to do.
- stonewareslord 5y ago> bundle Busybox, a 1.6mb binary, to run shell scripts with bashisms What do you mean? Busybox doesn't come with bash so it wouldn't work with bashisms.
- an_opabinia 5y agoBusybox works with some bashisms.