Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. su --command 'read -n 1 -s key; if [ "$key" == "g" ]; then su; fi;'
  2. echo -n "W"
  3. sleep 0.09
  4. echo -n "e"
  5. sleep 0.09
  6. echo -n "l"
  7. sleep 0.09
  8. echo -n "c"
  9. sleep 0.09
  10. echo -n "o"
  11. sleep 0.09
  12. echo -n "m"
  13. sleep 0.09
  14. echo -n "e"
  15. sleep 0.09
  16.  
  17. Welcome
  18.  
  19. root@myuser:~#
  20.  
  21. otheus@otheus-VirtualBox ~ $ ( while true; read x; do echo $x; done; ) &
  22. [1] 2841
  23. otheus@otheus-VirtualBox ~ $
  24.  
  25. [1]+ Stopped ( while true; read x; do
  26. echo $x;
  27. done )
  28.  
  29. start_worker &
  30.  
  31. while jobs %- &>/dev/null; do
  32. read -n 1 -s -t 1 key
  33. # test key
  34. if [[ $key == q ]]; then
  35. kill -1 %-
  36. break
  37. fi
  38. fi
  39. wait
  40.  
  41. read -n1
  42.  
  43. array=(W e l c o m e)
  44. buf=0
  45. while pgrep "inputproc" > /dev/null; do
  46. echo -n ${array[buf]}
  47. ((buf++))
  48. sleep 0.09
  49. done
  50. #Insert any commands you want to run afterwards here...
  51.  
  52. ./mainscript & ./inputproc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement