diff --git a/_template/example.sh b/_template/example.sh deleted file mode 100755 index 51b68a65..00000000 --- a/_template/example.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -# This is a bash script template in order to help you quick start any script. -# It contains some sensible defaults, you can learn more by visiting: -# https://google.github.io/styleguide/shell.xml - -# This option will make the script exit when there is an error -set -o errexit -# This option will make the script exit when are unset variables -set -o nounset - -main() { - # A string variable containing only the FIRST argument passed to the script, - # you can use input=$@ to get a string with ALL arguments - input=$1 - - # Add your code here -} - -# Calls the main function passing all the arguments to it via '$@' -# The argument is in quotes to prevent whitespace issues -main "$@" diff --git a/_template/exercise_stub b/_template/exercise_stub new file mode 100644 index 00000000..37f0c986 --- /dev/null +++ b/_template/exercise_stub @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +# This stub should help you get started: +# - Bash is flexible. You may use functions or write a "raw" script. +# +# - Complex code can be made easier to read by breaking it up +# into functions, however this is sometimes overkill in bash. +# +# - You can find links about good style and other resources +# for Bash in './README.md'. It came with this exercise. +# +# Example: +# # other functions here +# # ... +# # ... +# +# main () { +# # your main function code here +# } +# +# # call main with all of the positional arguments +# main "$@" +# +# *** REMOVE THIS STUB BEFORE SUBMITTING YOUR SOLUTION FOR MENTORING ***