this post was submitted on 21 May 2024
207 points (96.4% liked)

Programming

17509 readers
356 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
 

New favorite tool ๐Ÿ˜

you are viewing a single comment's thread
view the rest of the comments
[โ€“] ReluctantMuskrat@lemmy.world 6 points 6 months ago (2 children)

As a long-time bash, awk and sed scripter who knows he'll probably get downvoted into oblivion for this my recommendation: learn PowerShell

It's open-source and completely cross-platform - I use it on Macs, Linux and Windows machines - and you don't know what you're missing until you try a fully objected-oriented scripting language and shell. No more parsing text, built-in support for scalars, arrays, hash maps/associative arrays, and more complex types like version numbers, IP addresses, synchronized dictionaries and basically anything available in .Net. Read and write csv, json and xml natively and simply. Built-in support for regular expressions throughout, web service calls, remote script execution, and parallel and asynchronous jobs and lots and lots of libraries for all kinds of things.

Seriously, I know its popular and often-deserved to hate on Microsoft but PowerShell is a kick-ass, cross-platform, open-source, modern shell done right, even if it does have a dumb name imo. Once you start learning it you won't want to go back to any other.

[โ€“] caseyweederman@lemmy.ca 7 points 6 months ago (1 children)

I appreciate you sharing your perspective. Mine runs counter to it.
The more PowerShell I learn, the more I dislike it.

[โ€“] jelloeater85@lemmy.world 3 points 6 months ago

As someone who spent 2 years learning and writing PowerShell for work... It's... Okay. Way easier to make stuff work then bash, and gets really powerful when you make libraries for it. But... I prefer Python and GoLang for building scripts and small apps.

[โ€“] jelloeater85@lemmy.world 1 points 6 months ago (1 children)
[โ€“] ReluctantMuskrat@lemmy.world 4 points 6 months ago (1 children)

I do. Currently I use it mostly for personal stuff as part of my time spent on production support. Importing data from queries, exporting spreadsheets, reading complex json data and extracting needed info, etc. In the past when I was on DevOps used it with Jenkins and various automation processes, and I've used it as a developer to create test environments and test data.

[โ€“] jelloeater85@lemmy.world 1 points 6 months ago

Nice! Sounds like a good use case.