zigford.org

About | Links | Scripts
Sharing linux/windows scripts and tips

Introducing PwshBlog

January 01, 2019 — Jesse Harris

Over the holidays I've kept myself busy by porting BashBlog to PowerShell. Although work is by no means complete, you can actually use it to edit an existing blogpost

Read more...

Replacing bash scripting with powershell

September 04, 2018 — Jesse Harris

This article on replacing bash scripting with python was being shared around on twitter today.

The problem is if you want to do basically anything else, e.g. write logic, use control structures, handle complex data... You're going to have big problems. When Bash is coordinating external programs, it's fantastic. When it's doing any work whatsoever itself, it disintegrates into a pile of garbage.

To me, this is what is awesome about PowerShell. I feel like it gets the shell part right, and also supports sane logic, data structures and so on. Sticking to the same language for quick system admin tasks and for longer form script writing really helps learn the ins-and-outs of a language.

As for python, I have started writing some of my regular tools for use on linux in python and so far it just doesn't seem as natural as powershell, although that could just be because powershell is like muscle memory for me.

I'd love to give powershell a better chance on linux, but, it is a bit slow to spin up on the raspberry pi and not available everywhere. For instance to use it on Gentoo, I've got it installed as a snap.

If you have any comments or feedback, please email me and let me know if you will allow your feedback to be posted here.

Tags: shells, bash, python, scripting, powershell

Ripping an album from youtube - CLI Style

May 28, 2018 — Jesse Harris

With the advent of Spotify, Apple Music, Youtube, Pandora and many other streaming music services, the need to have local mp3 files doesn't crop up very often. However, my kids either have cheap mp3 players or use their 3ds's to play local mp3 files.

Read more...