Beispiele zum Blogpost.

This commit is contained in:
2026-01-17 09:36:55 +01:00
parent bc827535b9
commit 684e62e0d8
5 changed files with 74 additions and 0 deletions

23
teil25/on-exit.sh Executable file
View File

@@ -0,0 +1,23 @@
#! /usr/bin/bash
on_exit() {
echo "Programmende signalisiert."
}
on_debug() {
echo "debug handler"
echo "[DEBUG] counter=${counter}"
}
trap on_exit exit
trap on_debug debug
sleep 10
#counter=0
#while true; do
# let counter++
# echo "running..."
#done