Guest User

Untitled

a guest
Nov 24th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. #!/bin/bash
  2. cmd="nohup mycommand";
  3. other_cmd="nohup othercommand";
  4.  
  5. "$cmd &";
  6. "$othercmd &";
  7.  
  8. $cmd &
  9. $othercmd &
  10.  
  11. nicholas@nick-win7 /tmp
  12. $ cat test
  13. #!/bin/bash
  14.  
  15. cmd="ls -la"
  16.  
  17. $cmd &
  18.  
  19.  
  20. nicholas@nick-win7 /tmp
  21. $ ./test
  22.  
  23. nicholas@nick-win7 /tmp
  24. $ total 6
  25. drwxrwxrwt+ 1 nicholas root 0 2010-09-10 20:44 .
  26. drwxr-xr-x+ 1 nicholas root 4096 2010-09-10 14:40 ..
  27. -rwxrwxrwx 1 nicholas None 35 2010-09-10 20:44 test
  28. -rwxr-xr-x 1 nicholas None 41 2010-09-10 20:43 test~
  29.  
  30. cmd="google-chrome"
  31. "${cmd}" &>/dev/null &disown
  32.  
  33. cmd="google-chrome"
  34. eval "${cmd}" &>/dev/null &disown
  35.  
  36. #!/bin/bash
  37.  
  38. # Run a command in the background.
  39. _evalBg() {
  40. eval "$@" &>/dev/null &disown;
  41. }
  42.  
  43. cmd="google-chrome";
  44. _evalBg "${cmd}";
  45.  
  46. filename="filename"
  47. extension="txt"
  48. for i in {1..20}; do
  49. eval "filename${i}=${filename}${i}.${extension}"
  50. touch filename${i}
  51. echo "this rox" > filename${i}
  52. done
  53.  
  54. ./run.sh &>/dev/null &
Add Comment
Please, Sign In to add comment