echoctl 472 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #!/bin/bash
  2. set -e
  3. set -u
  4. set -o pipefail
  5. command_parsed=0
  6. . functions
  7. . conf
  8. while getopts 'h12an:' OPTION; do
  9. case "$OPTION" in
  10. n)
  11. node=$OPTARG
  12. call_node node
  13. ;;
  14. 1)
  15. call_1
  16. ;;
  17. 2)
  18. call_2
  19. ;;
  20. a)
  21. call_1
  22. call_2
  23. ;;
  24. h)
  25. print_help
  26. ;;
  27. ?)
  28. print_usage
  29. exit 1
  30. command_parsed=1
  31. ;;
  32. :)
  33. echo "cosa fa?"
  34. ;;
  35. esac
  36. done
  37. if [ $command_parsed -eq 0 ]
  38. then
  39. print_usage
  40. fi
  41. #shift "$(($OPTIND -1))"