Files
bash-tut/teil25/on-exit.sh
2026-01-17 09:36:55 +01:00

24 lines
266 B
Bash
Executable File

#! /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