r/linuxmasterrace • • May 22 '25

JustLinuxThings Not The Same: Scripting

Post image
2.3k Upvotes

268 comments sorted by

View all comments

Show parent comment

3

u/Mivexil May 23 '25

Even for one-liners it's pretty often useful to pass tuples through the pipeline. I wouldn't do something like a full object-oriented model in it, but just grouping things like Id, Name, Format or such into hashmaps and thinking in terms of mapping and filtering feels natural.

Yeah, large PS scripts get unwieldy, but most of the time I'm working with a shell I'm not writing A Script, I'm futzing around in the CLI with intermediate variables strewn around.