Scripting

Posts tagged with #scripting
Total: 7

Running Multiple Server Processes From One Script

Notes | 2025-02-23 (updated 2025-10-25) | 1 min read
#bash #microservices #scripting

Doing local development on a bunch of interconnected services I often want to start multiple long running server processes.

This is the basic script I use for that.

Read more…

Cleanup After Script Exit

Notes | 2024-09-03 (updated 2025-10-25) | 1 min read
#bash #linux #scripting

Many of my scripts work with temporary files, usually relative to the scripts directory1, while at the same time using set -e to exit as soon as something fails.

In this scenario the script leaves behind these temporary files by default, which is not desirable.

We can however do a proper cleanup using the trap concept.

Read more…

Bash: Find All Folders Containing File With Name

Notes | 2024-03-01 (updated 2025-10-25) | 1 min read
#bash #scripting

fileName="my-file.yaml"
find . -type f -name "$fileName" -printf "%h\n"

Working With Dates in Bash and Other Shells

Notes | 2024-02-22 (updated 2025-10-25) | 1 min read
#bash #linux #scripting

Often times we need the current date (and time) when scripting inside bash or other shells. For example when creating a backup file or writing to a log.

Read more…

Managing Multiple Kube Config Files

Notes | 2024-02-22 (updated 2025-10-25) | 1 min read
#k8s #productivity #scripting

This is a simple script that takes multiple kube config files and deeply merges them into one.

I’ve since switched to [[kubeswitch]], which works much cleaner than this home-grown script.

Read more…

Navigate to Script Directory

Notes | 2024-01-28 (updated 2025-10-25) | 1 min read
#bash #linux #scripting

Often times when writing scripts I want to reference files in the same directory, but keep the script portable in case it is part of a git repository being checked out somewhere else or just the folder getting moved.

Read more…

My Publishing Pipeline

Update for 2023

Posts | 2023-08-25 (updated 2025-10-26) | 6 min read
#gitlab #hugo #pkm #productivity #scripting #writeup
Series: Tech Behind the Blog

I write an extensive personal knowledge base using markdown, code-server and a variety of other tools. Originally, in 2021, I wanted to have something like Obsidian Publish but self-hosted, so I created it.

Over time my knowledge base evolved more into a second brain, tracking not only my technical notes and journal, but also things like recipes and hikes. With this my publishing pipeline, and the script at it’s core, extended in a multitude of ways.

Read more…