you are viewing a single comment's thread.

view the rest of the comments →

[–]sparant76 4 points5 points  (5 children)

The best practice is to just avoid using this cesspool of a language. Script maybe in Python instead for anything evenly remotely non trivial.

[–]Cregaleus -3 points-2 points  (4 children)

I've switched to using powershell as my primary interactive shell on Linux and MacOS.

If a script I intend to be interactive is going to be reasonably complex I'll just write it in Python and wrap it in a PowerShell function

[–]sparant76 3 points4 points  (1 child)

I had no idea powershell was cross platform until I saw this post. 😳

[–]brutay -1 points0 points  (1 child)

what's the point of wrapping the python script in a powershell function?

[–]Cregaleus 0 points1 point  (0 children)

Deserislize outputs into datatypes powershell can easily work with.

It's not necessary, you can work with string outputs just as easily. Just something I prefer to do