4 ms·
I am dead serious. Powershell should replace (bash) shell scripting under any Linux. I find shell scripts terrible, I've learned to switch to Python quickly, d
by louwrentius 7y ago
I am dead serious. Powershell should replace (bash) shell scripting under any 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.
Powershell even has a unit test tool called 'pester' which is funny to me because it means 'bully' in my native language.
- geocrasher 7y agoI don't know what your native language is, but in English "pester" means to annoy. A negative connotation no matter what. 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.
- perl4ever 7y ago>I don't know what your native language is Dutch?
- dntbnmpls 7y ago> I am dead serious. Powershell should replace (bash) shell scripting under any Linux. 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.
- freedomben 7y agowhy can't the two coexist? On Linux you can currently choose rather easily between bash, fish, zsh, ash, dash, sh, ksh, csh, tcsh, fish and more. Every script can use the one it wants easily with `#!/usr/bin/env <shell>` 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.
- freddref 7y agopowershell is ok, I guess, but the core issue is it's over-engineered. 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 )
- sedatk 7y ago> the core issue is it's over-engineered. I wouldn't call it over-engineered. Ambitious? Maybe, but I don't see PowerShell lagging behind in any front it's designed for.
- ShamelessC 7y agoHonestly my biggest complaint is just that it's more verbose than bash which is admittedly pretty cryptic at times. Now that I've learned bash though, I have little need to move to PowerShell. Bash is tough to learn at first because its syntax is alien but I've learned enough to get things done with it.
- nwmcsween 7y agoPowershell is kind of half baked. In Powershell you mostly interact with in a functional manner (chaining, filtering, etc) but Powershell for whatever reason provides nearly zero functional programming features which makes it painful to script in. IMO anyways
- chillfox 7y agoNo one should script for bash or PowerShell for that matter. 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.
- kiplkipl 7y ago>Powershell is very command-line friendly, with easy tab-completion of commands 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.
- 3PS 7y agoThe Title-Case is unnecessary; the commands aren't case sensitive. It's just considered good practice for maintainability. Plus, most common commands are aliased to shorter ones.