diff --git a/gen_random.sh b/gen_random.sh index 00cb7e6..e0082f0 100755 --- a/gen_random.sh +++ b/gen_random.sh @@ -18,3 +18,4 @@ curl --silent -X PUT --user "adelorenzo:dimi2014" https://couchdb.oe74.cloud/kk_ random_rev=`curl --silent -X GET https://adelorenzo:dimi2014@couchdb.oe74.cloud/kk_users/$random | jq -c '._rev' | sed 's/^.//' | sed 's/.$//'` curl --silent -H "Content-Type: text/x-yaml" -X PUT --data-binary @${random}-wg_server.yaml --user "adelorenzo:dimi2014" "https://couchdb.oe74.cloud/kk_users/${random}/${random}-wg_server.yaml?rev=$random_rev" > /dev/null rm ${random}-wg_server.yaml + diff --git a/options-example.sh b/options-example.sh new file mode 100644 index 0000000..0a6eac8 --- /dev/null +++ b/options-example.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +foo1() { echo 'hello from foo1!'; } +foo2() { ls -l; } +foo3() { echo 'hello from foo3!'; } + +# read -p "Enter a Number (1,2, or 3): " num + +if [[ $1 = [123] ]]; then # validate input + foo"$1" +fi \ No newline at end of file