3 ms·
Powershell doesn't feel like a shell to me at all. It's hideously inconsistent and somewhere between shell scripting and programming. You're right that Python i
by cup-of-tea 8y ago
Powershell doesn't feel like a shell to me at all. It's hideously inconsistent and somewhere between shell scripting and programming. You're right that Python is by far the better tool. Powershell only had to beat its incumbent, cmd, which is awful. Nobody would switch from bash/python to Powershell.
Also, you can totally pipe into while in bash. There is no need to use xargs there. You can even deal with spaces in filenames if you need to...
- nailer 8y ago> Nobody would switch from bash/python to Powershell. I've used bash for 20 years, worked at Red Hat and IBMs Linux Group and my name might be in your OS. I switched from bash/python to Powershell. > It's hideously inconsistent How so? It's the only shell I've ever used where you can guess most commands. That's a massive achievement. > There is no need to use xargs there. Sure, I'd just use -exec and a fat lady. The example still shows the differences between - treating everything as strings then scraping with regexs and other string manipulation tools - using objects > You can even deal with spaces in filenames if you need to... A file name is an attribute of the file (inode/fileID). If you have to think about whether a file name has spaces or not you're scraping, rather than treating it as a single string-type attribute. This is why bash has a reputation for being brittle.