Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. ## trap ctrl-c and call ctrl_c()
  2.  
  3. trap ctrl_c INT
  4.  
  5. function ctrl_c() {
  6.  
  7. echo "** Trapped CTRL-C"
  8.  
  9. exit
  10. }
  11.  
  12. read -p "Press any key to continue... " -n1 -s
  13.  
  14. gnome-terminal -e "bash -c './userInput.sh; bash;'"
  15.  
  16. ## trap ctrl-c and call ctrl_c()
  17.  
  18. trap ctrl_c INT
  19.  
  20. function ctrl_c() {
  21.  
  22. echo "** Trapped CTRL-C"
  23.  
  24. exit
  25. }
  26.  
  27. node server.js
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement