Profile picture

Oliver Baumann

Nobody reads your blog

Blog posts, by date

Three patterns for speedy data processing with AWK

, last updated on

Have you ever fought with larger-than-memory datasets? Wanted to filter some column-oriented data against another file, or aggregate counts on groups? In this post, we’ll explore the problem-space around LTM data, analyze how I failed (multiple times…), and look at three useful patterns involving awk!

ca. 1400 words, 7 minute(s) reading time.

A flock of fish: locking functions for the fish-shell

As I was hacking away at a shell-script the other day, I realised the script should prevent multiple instances from running at the same time. In my case, I wanted a simple egg-timer on the command line that runs for X minutes, shows a notification and beeps annoyingly, then exits. Obviously, there’s no point in having multiple timers stack up, so there should only ever be one ticking away. There are multiple other reasons you may only want a single instance running: a long-running backup-task should complete before the next iteration starts, or all writes to a file should be synced to disk before modifying the file again.