This page is part of my digital garden.

This page might be unfinished or have typos. These pages are meant as part of a public living notebook to be edited over time. For more, visit the page explaining the concept of a digitial garden.

Scripting

Misc scripting things

How execute a bash one-liner which echo’s sleep every 10 seconds until you stop it:

$ bash -c while true; do echo sleep; sleep 10;done && echo done

This proved useful when I needed to keep a container running doing something while another container ran some database migrations. The system1 running the containers would kill the migration container if the other container finished, but the other container had the same code and would otherwise deadlock the migration by trying to perform the migration as well. Keeping it busy worked well to avoid the exit 137 errors the system was giving me.


  1. The service was Fargate ↩︎

Last updated on