Dup Ver Goto 📝

Trapping Interrupts

PT2/shell/bash bash trap does not exist
To
9 lines, 31 words, 173 chars Page 'Trap' does not exist.
#!/bin/bash
trap trap_int SIGINT
trap_int() {
  echo "Trap int"
}
for i in {1..10}; do echo "$i"; sleep 1; done

Note trap_int is a string that will be evald.