options-example

This commit is contained in:
Adolfo Delorenzo 2023-12-20 10:42:08 -06:00
parent dc40116c23
commit 6301f19cbc
2 changed files with 12 additions and 0 deletions

View File

@ -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/.$//'` 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 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 rm ${random}-wg_server.yaml

11
options-example.sh Normal file
View File

@ -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