2 ms·
That is a great example, but for different reasons. I think PowerShell is amazing, but it never feels like something I want to work in as a shell. Writing scrip
by Semaphor 4y ago
That is a great example, but for different reasons. I think PowerShell is amazing, but it never feels like something I want to work in as a shell. Writing scripts in an IDE, sure. But to convert some yaml to json I’d much rather type open/file.yml | to json
- 0x445442 4y agoThis is where I’m at with PS as well. It’s stuck in this no man’s land between bash and python. It’s a better scripting language than bash and a better shell than python. But when compared to their main purposes it’s a worse shell than bash and a worse scripting language than python. The caveat of course is Windows system administration. I’m sure it’s excellent in that domain.
- Semaphor 4y agoI end up using C# as a scripting language, the GUI on Windows, and ZSH on Linux Servers…
- deleted 4y ago[deleted]
- vips7L 4y agoOP here wrote this the most verbose way I could think possible. Most commands are pre-aliased in PowerShell and arguments are fuzzy matched as long as they're not ambiguous. For example: Remove-Item $directory -Recurse -Force rm $directory -r -fo For this specific example ConvertFrom-Yaml actually doesn't exist as a standard cmdlet and ConvertTo-Json isn't aliased by default: gc ./something.yml | ConvertFrom-Yaml | ConvertTo-Json > /some/file.json