by louwrentius · 6y ago · 0 comments
I find shell scripts terrible, I've learned to switch to Python quickly, despite the overhead.
Powershell is very command-line friendly, with easy tab-completion of commands. I've worked with it extensively on Windows, creating large worklflows with it, it's very nice.
Powershell even has a unit test tool called 'pester' which is funny to me because it means 'bully' in my native language.
I don't get the hate on Bash though. It's a natural extension of the command line, and works quite nicely to get a lot done without the overhead. Deployment is a lot easier in my environment (web hosting) because all of the servers are homogenous, and I don't need to worry about any dependencies because I rely mostly on coreutils + grep and awk.
Dutch?
If you're arguing that powershell should be the default that's a different argument. sh syntax is still in widespread use because of how portable it is and how widely known it is. It truly is the lingua franca of unixey OSes.
If you have to write shell scripts on Linux then target #!/bin/sh and write it so that it works in other shells.
The problem with Powershell for scripting is that it is just good enough that people don't go use something better like Python or Ruby.
Bash is weird, but it is everywhere and it's simple, and that simplicity is going the be very difficult to replace. How do replace nothing?
I love Python, do switch to it.
( The windows and MS stack is utter balls )
I wouldn't call it over-engineered. Ambitious? Maybe, but I don't see PowerShell lagging behind in any front it's designed for.
Bash is tough to learn at first because its syntax is alien but I've learned enough to get things done with it.
I really couldn't agree less. Title-Case with hyphens and verbose command names make it horrible just to type. The only reason I see for doing that is so that it would fit in with the rest of the ecosystem.
Maybe it's a nice scripting language: we already have quite a lot of nice scripting languages.
This probably means you don't have a CS background and/or very little experience with linux/scripting/etc and dare I say powershell itself. Scripting in linux/unix/etc is primarily text based whereas powershell is object based ( which is why powershell tends to be slow in comparison ). Also, the only thing going for powershell is it's tie-in with the .Net Framework along with Microsoft based servers ( such as SQL Server ). Like most Microsoft products, it's meant for their environment. There really isn't any real reason for powershell on linux.
> I find shell scripts terrible, I've learned to switch to Python quickly, despite the overhead. Powershell is very command-line friendly, with easy tab-completion of commands. I've worked with it extensively on Windows, creating large worklflows with it, it's very nice.
Sounds about right. I can't believe that's what you wrote in support of powershell. Linux, bash, etc was built from the ground up to be command-line friendly. Windows was built to be GUI friendly. But there is a reason why windows administration is viewed as a joke in the tech industry. I guess powershell may seems amazing when going from GUI based administration to actual script based automation/administration.
> Powershell even has a unit test tool called 'pester' which is funny to me because it means 'bully' in my native language.
Yeah, it means bother/annoy in english, but you probably knew that already.