fork(12) download
  1. #!/bin/sh
  2.  
  3. process_install()
  4. {
  5. echo "Performing process_install() commands, using arguments [${*}]..."
  6. }
  7.  
  8. process_exit()
  9. {
  10. echo "Performing process_exit() commands, using arguments [${*}]..."
  11. }
  12.  
  13. for choice in true false file_not_found
  14. do
  15. if [ "$choice" = "true" ]
  16. then
  17. process_install foo bar
  18. elif [ "$choice" = "false" ]
  19. then
  20. process_exit baz qux
  21. else
  22. echo "Invalid choice [${choice}]..."
  23. fi
  24. done
Success #stdin #stdout 0s 5312KB
stdin
Standard input is empty
stdout
Performing process_install() commands, using arguments [foo bar]...
Performing process_exit() commands, using arguments [baz qux]...
Invalid choice [file_not_found]...