diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 00000000..13566b81 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 00000000..4444b225 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..abf4733a --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/softdev.iml b/.idea/softdev.iml new file mode 100644 index 00000000..d6ebd480 --- /dev/null +++ b/.idea/softdev.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..35eb1ddf --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/01-read_input.sh b/01-read_input_ADM.sh similarity index 65% rename from 01-read_input.sh rename to 01-read_input_ADM.sh index 438445b4..314c287b 100644 --- a/01-read_input.sh +++ b/01-read_input_ADM.sh @@ -10,3 +10,12 @@ echo 'Your name was stored in $name' # exercise: write a script that asks the user for a # filename and create an empty file named after it + +echo "Hey $name, What is your filename?" +read filename +echo "You want $filename" +echo "Creating $filename ..." +touch $filename +echo "$filename creted" +ls +echo "Bye,bye" diff --git a/02-add_nums.sh b/02-add_nums.sh index 2fd13cb5..be560a99 100644 --- a/02-add_nums.sh +++ b/02-add_nums.sh @@ -11,5 +11,22 @@ sum=$(( first+second+third )) echo "The sum is $sum" + + # exercise: ask the user for the width and height and present total # number of pixels + +echo " " +#Prompt the user to enter the width +echo "Please enter the width. \n" +read width +echo "" +echo "Please enter the height. \n" +read height + +echo "" +pixelTotal=$(( $width * $height )) +echo "Your width is: ${width} +Your height is: ${height} +Your display has ${pixelTotal} pixels." + diff --git a/03-happy.sh b/03-happy.sh index 8095d30e..caa24718 100644 --- a/03-happy.sh +++ b/03-happy.sh @@ -14,3 +14,11 @@ fi # exercise: write a script that prints whether today is # the weekend or not +echo "Which day of a week is today?" +read day +if [[ ${day,,} == "saturday" ]] | [[ ${day,,} == "sunday" ]] +then + echo "Horayyyy!! Today is the weekend. Enjoy yourself! Be ready for the next week." +else + echo "Today is a weekday. Keep focus on your work." +fi \ No newline at end of file diff --git a/05-grade.sh b/05-grade.sh index c148449a..2ea26d61 100644 --- a/05-grade.sh +++ b/05-grade.sh @@ -19,3 +19,26 @@ fi # that prints "it's cold" if the temperature is < 40 # it's chilly if < 60, it's okay if < 70 and, it's hot for # everything else + + + +echo "What is the temperature today?" +read temp + +if [ $temp -tl 40 ]; then + + echo "It's cold" + + echo "It is cold." + +elif [ $temp -tl 60 ]; then + echo "It's chilly" +elif [ $temp -tl 70 ]; then + echo "It's okay" +else + + echo "It is hot" + + echo "It's hot" + +fi diff --git a/07-beer.sh b/07-beer.sh index c03aded6..b0b033ce 100644 --- a/07-beer.sh +++ b/07-beer.sh @@ -22,3 +22,24 @@ done # exercise: implement another counting song (such as 12 days of Christmas) # using loops and if statements. + +echo "Now we sing about monkeys jumping on the bed" +echo "How many monkeys?" +read count + +while [ $count -ge 0 ]; do + if [ $count -ge 2 ]; then + echo "$count little monkeys jumping on the bed" + echo "one fell off and bumped his head" + echo "Moma called the doctor and the doctor said" + echo "No more monkeys jumping on the bed!" + else + echo "$count little monkey jumping on the bed" + echo "He fell off and bumped his head" + echo "Moma called the doctor and the doctor said" + echo "No more monkeys jumping on the bed!" + fi + + ((count = count - 1)) + +done diff --git a/12-monkeys.sh b/12-monkeys.sh new file mode 100644 index 00000000..fe5540b6 --- /dev/null +++ b/12-monkeys.sh @@ -0,0 +1,20 @@ +# exercise: implement another counting song (such as 12 days of Christmas) +# using loops and if statements. + +echo "Now, let's sing monkey jumping on the bed." +echo "How many monkeys are jumping on the bed?" +read number +while [ $number -ge 0 ]; do + if [ $number -ge 2 ]; then + echo "$number little monkeys jumping on the bed. One fell off and bumped its head." + echo "Momma called the doctor and the doctor said, 'No more Monkeys jumping on the bed!'" + elif [ $number -ge 1 ]; then + echo "$number little monkeys jumping on the bed. One fell off and bumped its head." + echo "Momma called the doctor and the doctor said, 'No more Monkeys jumping on the bed!'" + else + echo "No more monkeys jumping on the bed." + fi + + ((number = number - 1)) +done + #statements diff --git a/13-RNG.sh b/13-RNG.sh new file mode 100644 index 00000000..869621f6 --- /dev/null +++ b/13-RNG.sh @@ -0,0 +1,26 @@ +#!/bin/bash +echo "Taisann Kham" +echo "Hello, welcome to Taisann's RNG guessing game" +echo "Please choose a number between 0 - 9" +RANGE=10 +rand=0 +rand=$RANDOM +let "rand %= $RANGE" +read input +loop=false +while [[ $loop != q ]]; do + if [[ $input -lt $rand ]]; then + echo "Your number is smaller than the correct number" + fi + if [[ $input -gt $rand ]]; then + echo "Your number is bigger than the correct number" + fi + if [[ $input -eq $rand ]]; then + loop=q + echo "Congratulations! You guessed the correct number, $rand!" + fi + if [[ $loop != q ]]; then + echo "Please choose a new number" + read input + fi +done diff --git a/GitBranchGraph-AfterMerging.png b/GitBranchGraph-AfterMerging.png new file mode 100644 index 00000000..2fec5dbe Binary files /dev/null and b/GitBranchGraph-AfterMerging.png differ diff --git a/GitBranchGraph.PNG b/GitBranchGraph.PNG new file mode 100644 index 00000000..21216771 Binary files /dev/null and b/GitBranchGraph.PNG differ diff --git a/GitBranchGraphTwo.PNG b/GitBranchGraphTwo.PNG new file mode 100644 index 00000000..2c88c454 Binary files /dev/null and b/GitBranchGraphTwo.PNG differ diff --git a/GitHub_Network_Pic_1.PNG b/GitHub_Network_Pic_1.PNG new file mode 100644 index 00000000..2c7bf26c Binary files /dev/null and b/GitHub_Network_Pic_1.PNG differ diff --git a/GitHub_Network_Pic_2.PNG b/GitHub_Network_Pic_2.PNG new file mode 100644 index 00000000..7756646e Binary files /dev/null and b/GitHub_Network_Pic_2.PNG differ diff --git a/Ryan_Gambrell/ryans_bash_script.sh b/Ryan_Gambrell/ryans_bash_script.sh new file mode 100644 index 00000000..ca2543c8 --- /dev/null +++ b/Ryan_Gambrell/ryans_bash_script.sh @@ -0,0 +1,15 @@ +#/bin/bash +echo "My name is Ryan Peyton Gambrell" +echo "Welcome to Dr. Anca Doloc-Mihu's Software Development II class." +echo "" +echo "Here is my half pyramid." +echo "" +for outerStar in {1..6} +do + while [ $outerStar -gt 0 ] + do + echo -n "*" + ((outerStar--)) + done + echo "" +done diff --git a/Thanh_Tran/Thanh_Tran_script_bash.sh b/Thanh_Tran/Thanh_Tran_script_bash.sh new file mode 100644 index 00000000..f80f0c32 --- /dev/null +++ b/Thanh_Tran/Thanh_Tran_script_bash.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +echo "Hello! My name is Thanh Tran." +echo "Welcome to my first bash program! What is your name?" +read name +echo "Hi, $name . Nice to see you. Let play a game" + +echo "What is the closest planet to the Sun?" +read planet + +while [[ "${planet,,}" != "mercury" ]] +do + echo "Incorrect. Please guess again." + read planet +done + +echo "You got the right answer! Bye bye. See you again." \ No newline at end of file diff --git a/after-merge.png b/after-merge.png new file mode 100644 index 00000000..18636266 Binary files /dev/null and b/after-merge.png differ diff --git a/bash_basics b/bash_basics new file mode 160000 index 00000000..f2c27ae6 --- /dev/null +++ b/bash_basics @@ -0,0 +1 @@ +Subproject commit f2c27ae600396036cacff953c171639b04e7fa01 diff --git a/github_netowork_graph.png b/github_netowork_graph.png new file mode 100644 index 00000000..8c62d3b1 Binary files /dev/null and b/github_netowork_graph.png differ diff --git a/github_netowork_graph_conflict_merged.png b/github_netowork_graph_conflict_merged.png new file mode 100644 index 00000000..08f45c28 Binary files /dev/null and b/github_netowork_graph_conflict_merged.png differ diff --git a/josephShanahan.sh b/josephShanahan.sh new file mode 100644 index 00000000..76c90530 --- /dev/null +++ b/josephShanahan.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# read the name of the user and print hello + +echo "Hello! My name is Joseph Shanahan." +echo "I hope you are having a great day!!!" +msg="Would you like to see the hidden message? Please enter '1' for YES or '0' for NO." +echo $msg +read input +loop=false +while [[ $loop == false ]]; do + if [[ $input == 1 ]]; then + echo "Hello there!" + sleep 5s + loop=true + elif [[ $input == 0 ]]; then + echo $msg + read input + fi +done diff --git a/khendricks/nameAndCountdown.sh b/khendricks/nameAndCountdown.sh new file mode 100644 index 00000000..12a5f593 --- /dev/null +++ b/khendricks/nameAndCountdown.sh @@ -0,0 +1,10 @@ +#!/bin/bash +name=Kris +echo "Hello $name, isn't it a beautiful day to git?" +echo "Exiting in..." +for (( counter=10; counter>0; counter--)) +do +sleep 1s +echo -n "$counter " +done +printf "\n" \ No newline at end of file