s243a

trap_stack_test.sh

Apr 13th, 2019
343
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.33 KB | None | 0 0
  1. #trap_stack_test
  2. rm trap_stack_test.log
  3. touch trap_stack_test.log
  4. source trap_stack.sh
  5. rm trap_test_out.log
  6. touch trap_test_out.log
  7. trap_1(){ echo "trap_1" | tee -a trap_stack_test.log; }
  8. trap_2(){ echo "trap 2" | tee -a trap_stack_test.log; }
  9. trap trap_1 SIGINT
  10. trap_push_append "trap_2" SIGINT
  11. read -p "Press enter to continue"
Advertisement
Add Comment
Please, Sign In to add comment