diff --git a/create-resource-group/create_resource_group b/create-resource-group/create_resource_group old mode 100644 new mode 100755 index 1fc13d3..1a9c7b3 --- a/create-resource-group/create_resource_group +++ b/create-resource-group/create_resource_group @@ -61,7 +61,7 @@ list_resource_groups() { az group list -o table } -# setup +setup check_region check_resource_group create_resource_group diff --git a/redirection-and-pipelines/error.txt b/redirection-and-pipelines/error.txt index 4f77620..9b3297e 100644 --- a/redirection-and-pipelines/error.txt +++ b/redirection-and-pipelines/error.txt @@ -1 +1,10 @@ ls: cannot access './dir': No such file or directory +total 24 +-rw-rw-rw- 1 vscode root 53 Oct 3 00:20 error.txt +-rw-rw-rw- 1 vscode root 390 Oct 1 00:23 output2.txt +-rw-rw-rw- 1 vscode root 862 Oct 3 00:15 output.txt +-rw-rw-rw- 1 vscode root 677 Oct 1 00:23 paragrah.txt +-rw-rw-rw- 1 vscode root 415 Oct 1 00:23 part1.txt +-rw-rw-rw- 1 vscode root 262 Oct 1 00:23 part2.txt +-rw-rw-rw- 1 vscode root 0 Oct 3 00:14 part3.txt +-rw-rw-rw- 1 vscode root 0 Oct 3 00:15 part4.txt diff --git a/redirection-and-pipelines/output.txt b/redirection-and-pipelines/output.txt index ccf1b18..86ed638 100644 --- a/redirection-and-pipelines/output.txt +++ b/redirection-and-pipelines/output.txt @@ -1,7 +1,18 @@ -total 8 --rw-rw-rw- 1 vscode vscode 0 Jan 17 18:03 error.txt --rw-rw-rw- 1 vscode vscode 0 Jan 17 18:10 output.txt --rw-rw-rw- 1 vscode vscode 415 Jan 17 17:37 part1.txt --rw-rw-rw- 1 vscode vscode 262 Jan 17 17:37 part2.txt --rw-rw-rw- 1 vscode vscode 0 Jan 17 17:54 part3.txt --rw-rw-rw- 1 vscode vscode 0 Jan 17 17:56 part4.txt +total 20 +-rw-rw-rw- 1 vscode root 53 Oct 1 00:23 error.txt +-rw-rw-rw- 1 vscode root 390 Oct 1 00:23 output2.txt +-rw-rw-rw- 1 vscode root 0 Oct 3 00:14 output.txt +-rw-rw-rw- 1 vscode root 677 Oct 1 00:23 paragrah.txt +-rw-rw-rw- 1 vscode root 415 Oct 1 00:23 part1.txt +-rw-rw-rw- 1 vscode root 262 Oct 1 00:23 part2.txt +-rw-rw-rw- 1 vscode root 0 Oct 3 00:14 part3.txt +-rw-rw-rw- 1 vscode root 0 Oct 1 00:23 part4.txt +total 24 +-rw-rw-rw- 1 vscode root 53 Oct 1 00:23 error.txt +-rw-rw-rw- 1 vscode root 390 Oct 1 00:23 output2.txt +-rw-rw-rw- 1 vscode root 431 Oct 3 00:14 output.txt +-rw-rw-rw- 1 vscode root 677 Oct 1 00:23 paragrah.txt +-rw-rw-rw- 1 vscode root 415 Oct 1 00:23 part1.txt +-rw-rw-rw- 1 vscode root 262 Oct 1 00:23 part2.txt +-rw-rw-rw- 1 vscode root 0 Oct 3 00:14 part3.txt +-rw-rw-rw- 1 vscode root 0 Oct 3 00:15 part4.txt diff --git a/redirection-and-pipelines/paragraph.txt b/redirection-and-pipelines/paragraph.txt new file mode 100644 index 0000000..a912842 --- /dev/null +++ b/redirection-and-pipelines/paragraph.txt @@ -0,0 +1,5 @@ +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. +Mauris pharetra et ultrices neque ornare aenean euismod. Adipiscing enim eu turpis egestas pretium aenean pharetra magna ac. Nibh nisl condimentum id venenatis a condimentum. Interdum velit euismod in pellentesque massa placerat. Ac feugiat sed lectus vestibulum mattis ullamcorper velit. +Libero justo laoreet sit amet cursus sit amet dictum sit. Pharetra vel turpis nunc eget lorem dolor sed. +Ultrices neque ornare aenean euismod elementum nisi quis eleifend quam. Laoreet id donec ultrices tincidunt. +Pulvinar sapien et ligula ullamcorper malesuada. \ No newline at end of file diff --git a/what-are-case-statements/case_statement b/what-are-case-statements/case_statement old mode 100644 new mode 100755 diff --git a/what-are-conditional-statements/is_number_even b/what-are-conditional-statements/is_number_even old mode 100644 new mode 100755 index e215ab3..71f7da7 --- a/what-are-conditional-statements/is_number_even +++ b/what-are-conditional-statements/is_number_even @@ -1,6 +1,8 @@ #!/bin/bash -number=25 +# A script that will determine if a number is even + +number=20 if [ $((number % 2)) -eq 0 ]; then diff --git a/what-are-functions/add_numbers b/what-are-functions/add_numbers old mode 100644 new mode 100755 index 050d20f..56c6cbe --- a/what-are-functions/add_numbers +++ b/what-are-functions/add_numbers @@ -2,7 +2,7 @@ check_even () { local mod=2 - echo "The value of mod is $mod" + echo "The value of mod is $mod inside of the function" if [ $(("$1" % $mod)) -eq 0 ] then echo "The number $1 is even!"; @@ -15,4 +15,4 @@ check_even () { number=2344 check_even $number -echo $mod \ No newline at end of file +echo "The value of mod is $mod outside of the function" \ No newline at end of file diff --git a/what-are-loops/for_loop_new_c b/what-are-loops/for_loop_new_c old mode 100644 new mode 100755 diff --git a/what-are-loops/for_loop_traditional b/what-are-loops/for_loop_traditional old mode 100644 new mode 100755 diff --git a/what-are-loops/loop_and_break b/what-are-loops/loop_and_break old mode 100644 new mode 100755 diff --git a/what-are-loops/until_loop b/what-are-loops/until_loop old mode 100644 new mode 100755 diff --git a/what-are-loops/while_loop b/what-are-loops/while_loop old mode 100644 new mode 100755 diff --git a/what-is-a-bash-script/.local/bin/hello_world b/what-is-a-bash-script/.local/bin/hello_world new file mode 100755 index 0000000..89ae6a1 --- /dev/null +++ b/what-is-a-bash-script/.local/bin/hello_world @@ -0,0 +1,5 @@ +#!/bin/bash + +# Welcome to your first Bash Script + +echo 'Hello World!' \ No newline at end of file diff --git a/what-is-a-bash-script/hello_world b/what-is-a-bash-script/hello_world old mode 100644 new mode 100755 diff --git a/what-is-a-variable/hello_variable b/what-is-a-variable/hello_variable old mode 100644 new mode 100755 index 89ae6a1..3d04635 --- a/what-is-a-variable/hello_variable +++ b/what-is-a-variable/hello_variable @@ -1,5 +1,9 @@ #!/bin/bash -# Welcome to your first Bash Script +# A script that will print out a message from a variable -echo 'Hello World!' \ No newline at end of file +hello_message='Hello World!' +current_dir=$(pwd) +readonly variable_wont_change="green" +variable_wont_change="red" +echo "$hello_message from $current_dir your favorite color is $variable_wont_change"