From e678e1e5c1aa234426bbbae09d9adca11ffe64ee Mon Sep 17 00:00:00 2001 From: Ayanfe5 Date: Fri, 4 Sep 2020 11:28:37 +0100 Subject: [PATCH] Setup-Vm --- VM.sh | 27 +++++++++++++++++++++++++++ readme.md | 10 ++++++++-- script.sh | 21 ++++++++++++++++++++- 3 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 VM.sh diff --git a/VM.sh b/VM.sh new file mode 100644 index 0000000..3e02743 --- /dev/null +++ b/VM.sh @@ -0,0 +1,27 @@ +# get resource group name + +read -p 'resource-group name: ' resourceGroupName + +# get VM + +read -p 'VM name: ' vmName + +# get username + +read -p 'username: ' username + +# create resource gource group + +az group create --name $resourceGroupName --location eastus + + +# Create VM + +az vm create \ + --resource-group $resourceGroupName \ + --name $vmName \ + --image UbuntuLTS \ + --admin-username $username \ + --ssh-key-values ~/.ssh/id_rsa.pub + + diff --git a/readme.md b/readme.md index 0d36888..0fb080e 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,13 @@ # Learning Bash Scripting -## Introduction +## Module-1 +- Introduction -### Using comments and variables +## Module-2 +- Using comments and variables +## Module-3 +- Read User's Input +## Module-3.1 +- Setting up VM \ No newline at end of file diff --git a/script.sh b/script.sh index 604772c..256f537 100644 --- a/script.sh +++ b/script.sh @@ -22,4 +22,23 @@ echo This is my course $course founded='Unilorin was founded in the year 1975' -echo This is my founded $founded \ No newline at end of file +echo This is my founded $founded + +read -p 'Entered name: ' name + +read -p 'Enter school: ' school + +read -p 'Enter course: ' course + +read -p 'Enter result: ' result + +echo 'my name is' $name 'my school is' $school 'my result is' $result + +read -p 'username for https://github.com: ' username + +read -p 'password for https://'$username'@github.com: ' password + +echo 'this is the' $username tand $password + + +