skeleton 662 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/bash
  2. # Licence : GPL v3
  3. # Author: Laurent HUBERT
  4. #
  5. # Example file for first-boot-script
  6. # Copy this file to a new file and add permission execution to the new file
  7. # Example:
  8. # # cp skeleton 02-myscript
  9. # # chmod +x 02-myscript
  10. #
  11. # Example Section : Displaying a banner
  12. cat <<EOF
  13. ##############################
  14. # My Banner #
  15. ##############################
  16. EOF
  17. # Example Section : asking user to enter a value
  18. read -p "Please enter a value: " answer
  19. # Example Section: use the value only if not empty
  20. if [ -n "$answer" ]
  21. then
  22. echo Using $answer as user data
  23. # Do something here
  24. exit 0
  25. else
  26. # Exit with non zero status
  27. exit 1
  28. fi