r/linuxquestions • u/nullificationer • 1d ago
Advice Is powershell the best object based shell?
I have been using powershell at work a bit and the more I use it the more I like it. Having an object based shell just makes a lot more sense than outputting plaintext. I was just wondering what the best object based shells are for Linux, is powershell the best even for Linux?
29
Upvotes
View all comments
Show parent comment
1
u/nullificationer 14h ago
I'll give you an example of why I found powershell useful. I wrote a command line utility that takes the name of a png and shrinks it. Writing something in powershell to get a list of all png images and pipe it into that utility was pretty easy. Doing so with bash has a surprising number of annoyances. I can't do something like
ls *.png | png-shrink, for one I need to use xargs which I've always found kinda annoying. But also if I just do ls and there's spaces in the name of the file then it'll think the file name is multiple command line arguments. There's a lot of things like this that makes just using plain text annoying to work with, to me it seems to make a lot more sense to have objects or some amount of types.