You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

27 lines
221 B

  1. #!/bin/sh
  2. gcc ex3.c -o ex3
  3. ./ex3 3 &
  4. sleep 1
  5. i=0
  6. while [ $i -lt 3 ]
  7. do
  8. pstree $$
  9. sleep 5
  10. i=$(( i + 1 ))
  11. done
  12. ./ex3 5 &
  13. sleep 1
  14. i=0
  15. while [ $i -lt 5 ]
  16. do
  17. pstree $$
  18. sleep 5
  19. i=$(( i + 1 ))
  20. done