folk.zone Wiki

a public knowledge base

Site Tools


terminal:scripting:bash_recipes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

terminal:scripting:bash_recipes [2026/10/23 15:57] – created - external edit 127.0.0.1terminal:scripting:bash_recipes [2026/10/24 10:26] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Bash Recipes ====== ====== Bash Recipes ======
  
-Reference for writing scripts: ''macbook-qol.sh'' in this folder is a real +Reusable patterns for writing shell scripts: boilerplate, flags, config, 
-example of most of these patterns.+logging, error handling, and testing.
  
 ===== Skeleton ===== ===== Skeleton =====
Line 28: Line 28:
 ''$?'' last exit code · ''$!'' last background PID ''$?'' last exit code · ''$!'' last background PID
  
-Env-var tunables with defaults (the pattern this repo's script uses):+Env-var tunables with defaults:
  
 <code bash> <code bash>
terminal/scripting/bash_recipes.1792792621.txt.gz · Last modified: by 127.0.0.1