Skip to content
Snippets Groups Projects
Commit 5922ff0e authored by Poori's avatar Poori
Browse files

arguments added

parent 1ea3abb2
Branches
1 merge request!3bash file added
#!/bin/bash
###input Variables
TOKEN="$1"
domain_name="$2"
while getopts d:a:i: option
do
case "${option}"
in
a) TOKEN=${OPTARG};;
d) domain_name=${OPTARG};;
i) IP=${OPTARG};;
esac
done
if [ "$TOKEN" == "" ] || [ "$domain_name" == "" ]; then
echo "API key and domain name are required"
exit 1
fi
root_domain=$(echo $domain_name | awk -F\. '{print $(NF-1) FS $NF}' )
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment