zigford.org

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

Zigford.org now available on Gemini

January 03, 2023 — Jesse Harris

Holidays are here and I've been missing posting to the site. Instead of posting, I've added gemini support (albeit very basic) to my local copy of bashblog.

Read more...

Defragging files in btrfs - Oneliner

April 10, 2020 — Jesse Harris

Sometimes, small databasey files get a bit fragmented over time on a COW filesystem. This touch of shell is a goodone to clean them up every now and then.

Read more...

Speed up your shell game

April 21, 2019 — Jesse Harris

Part of good use of the shell is doing repetitive things fast. A GUI can often be faster than using the command line because you can almost select things with your eyes ( eg, shift click files in a list to copy selectively. ) You can't always use a gui, however.

Read more...

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...

Burning a CD CLI Style

December 18, 2018 — Jesse Harris

I've written about ripping an album cli style, and sometimes it still makes sense to have older tech around. Like for example if you have 6 kids, you can't exactly afford to buy them all iPods. Or, maybe you can't afford the latest cars, and your car still has cd audio.

Thanksfully with Linux we don't have to resort to some clunky UI. We can do anything on the good ole' command line

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

Ip addresses on your subnet with xargs

September 01, 2018 — Jesse Harris

xargs strikes again. This time I'm going to use it's parallel feature to ping 255 machines very quickly. xargs has a parem -Px where x is the number of parallel processes to spawn of the subsequent process.

Read more...

Xargs tips

August 31, 2018 — Jesse Harris

After 12 years being a Windows admin, I've now used powershell more than other languages so I'm pretty fluent in it's syntax. So it makes me happy when I stumble upon bash/linux scripting paradigms which have been brought over to powershell.

Read more...