6 ms·
I think you should check out Powershell.
by merlincorey 8y ago
I think you should check out Powershell.
- alexeldeib 8y agoThis made me chuckle, because it's incredibly accurate. I started with bash and am still naturally more comfortable there for general purpose work. PowerShell is annoyingly verbose sometimes and has its own WTF moments, but there are waaay fewer surprises when working with complex scripts and variables.
- brirec 8y agoIt’s not included anywhere, but PowerShell is open source and you can install it on *nix now! Obviously the things that integrate with Windows aren’t there, but the object-oriented pipelining sure is.
- jedieaston 8y agoI believe the AD and Azure tools work, and the other ones needed for remotely managing Windows Server, although I could be wrong.
- mwj 8y agoIs that a joke? The syntax is worse than PHP and it doesn't run on Linux
- CupOfJava 8y agoIt runs on linux: https://azure.microsoft.com/en-ca/blog/powershell-is-open-sourced-and-is-available-on-linux/ https://azure.microsoft.com/en-ca/blog/powershell-is-open-so... https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-powershell-core-on-linux?view=powershell-6 https://docs.microsoft.com/en-us/powershell/scripting/setup/...
- AnIdiotOnTheNet 8y agoI'm actually a fan of Powershell, but unix people take it as a personal insult if you try and tell them their 70s-era tooling is inferior in some way to something designed with 30 years of hindsight.
- h1d 8y agoUsed PowerShell to code a small script and simply making md5 of a string is enough to make you feel nuts. The UNIX style. echo -n 'string' | md5 Compared to that obvious command, this is utter madness. You can't write a single thing without googling. $string = "string" $md5 = new-object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider $utf8 = new-object -TypeName System.Text.UTF8Encoding $hash = [System.BitConverter]::ToString($md5.ComputeHash($utf8.GetBytes($string))) $hash = $hash.ToLower() -replace '-', '' No shit the Bash on Windows is a godsend.
- pjmlp 8y agoOf course, because someone wrote a md5 executable for you to call. You can do the same on PowerShell and write a pipeline just the same way.
- h1d 8y agoYou're right that a shell alone can't calculate md5 but a separate md5 binary does it for you, but the question still stands when the common answer on the internet seems to be to write that cryptic code as that's probably the easiest way provided on PowerShell. The best alternative I could find is some community maintained PowerShell extension (with just 177 GitHub stars now), which is far better but the lack of interest in making PowerShell act more straightforward is weird. "string" | Get-Hash -Algorithm MD5 (https://github.com/Pscx/Pscx https://github.com/Pscx/Pscx) Still feels funny to read the GGP's comment. > 70s-era tooling is inferior in some way to something designed with 30 years of hindsight
- TeMPOraL 8y agoStill, all that stops PS from being a better shell in linuxland is some people writing PS-equivalents of all the small executables that ship with your linux distribution.