From 3b39f6d226736c63b7b08934e0a7a11fc87e71df Mon Sep 17 00:00:00 2001 From: Tolu07 Date: Sat, 4 Jan 2025 17:32:34 +0100 Subject: [PATCH 1/2] I added the greater sign symbol to separate each task and for aesthetics, modified the variable names and added a list og inbuilt commands to the script --- Challenges/Day_1/solution_day1_script.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Challenges/Day_1/solution_day1_script.sh b/Challenges/Day_1/solution_day1_script.sh index 2b904ef..3291df4 100644 --- a/Challenges/Day_1/solution_day1_script.sh +++ b/Challenges/Day_1/solution_day1_script.sh @@ -3,15 +3,18 @@ # First line of the script is the shebang which tells the system how to execute # Task 2: Echo -echo "Scripting is fun with @TWS" +echo "Learning scripting with @TWS" +echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>" # Task 3: Variables -variable1="Hello" -variable2="Bash" +var1="Hi" +var2="Tolu" +echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>" # Task 4: Using Variables -greeting="$variable1, $variable2!" +greeting="$var1, $var2!" echo "$greeting Welcome to the world of Bash scripting!" +echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>" # Task 5: Using Built-in Variables echo "My current bash path - $BASH" @@ -20,10 +23,13 @@ echo "PID of bash I am running - $$" echo "My home directory - $HOME" echo "Where am I currently? - $PWD" echo "My hostname - $HOSTNAME" +echo "List of files in my current directory, $PWD is:" +ls +echo ">>>>>>>>>>>>>>>>>>>>>>>>>>" # Task 6: Wildcards -echo "Files with .txt extension in the current directory:" -ls *.txt +echo "Files with .md extension in the current directory:" +ls *.md From affb12ebfee14a1987617362e1a61ee0a736606d Mon Sep 17 00:00:00 2001 From: Tolu07 Date: Sun, 5 Jan 2025 07:01:36 +0100 Subject: [PATCH 2/2] added a comment which explains how I'm going to execute the script with and without a text --- Challenges/Day_2/explorer.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/Challenges/Day_2/explorer.sh b/Challenges/Day_2/explorer.sh index be62ca1..182953b 100644 --- a/Challenges/Day_2/explorer.sh +++ b/Challenges/Day_2/explorer.sh @@ -9,6 +9,7 @@ while true; do ls -lh # Part 2: Character Counting + # I will add no text at first, then 4 characters which is my name Tolu to see read -p "Enter a line of text (Press Enter without text to exit): " input # Exit if the user enters an empty string