QHO443 Network Applications | Practical Skills Assessment
⏱️ Time Limit: 90 Minutes | 🎯 Complete All 5 Missions
Scenario: You are a junior system administrator at TechCorp Solutions. Your senior colleague is on leave, and you've been assigned urgent tasks that require Bash scripting skills.
📚 Structure: This assessment has two parts:
⚠️ Important: Test your scripts carefully. In the real world, one mistake in a script can affect entire systems!
Before the main missions, let's warm up!
Complete these practice exercises to familiarize yourself with Bash concepts. They're organized by difficulty level. You can attempt them in any order, but we recommend starting with Easy tasks.
💡 Tip: These practice tasks will help you succeed in the main missions!
Let's start with the absolute basics. Create a script that displays text on the screen.
$ ./hello.sh
Hello from TechCorp!
Remember: Every Bash script needs #!/bin/bash on the first line.
Use echo "your message" to display text.
Solution:
#!/bin/bash
echo "Hello from TechCorp!"
Practice storing data in a variable and displaying it.
$ ./myname.sh
My name is Shaheer
Create a variable: variablename="value" (NO spaces around =)
Use a variable: $variablename
Solution:
#!/bin/bash
name="Shaheer"
echo "My name is $name"
Work with multiple variables to create a complete sentence.
$ ./favorites.sh
Shaheer's favorite color is blue
You can use multiple variables in one echo statement.
Solution:
#!/bin/bash
name="Shaheer"
color="blue"
echo "$name's favorite color is $color"
Now let's make it interactive! Get input from the user.
$ ./fav_lang.sh
What is your favorite programming language?
Python
Python is a great choice!
Use read variablename to get input from the user.
The read command waits for the user to type something and press Enter.
Solution:
#!/bin/bash
echo "What is your favorite programming language?"
read language
echo "$language is a great choice!"
Learn to capture command output and store it in a variable.
$ ./show_date.sh
Today's date is: Thu Dec 19 2025
Command substitution: variable=$(command)
The date command shows the current date and time.
Solution:
#!/bin/bash
current_date=$(date)
echo "Today's date is: $current_date"
Practice writing output to a file instead of the screen.
# The info.txt file should contain:
System Information
[Current date]
[Current username]
> creates or overwrites a file
>> appends to an existing file
Solution:
#!/bin/bash
echo "System Information" > info.txt
date >> info.txt
whoami >> info.txt
echo "File created successfully"
Use conditional statements to compare numbers.
$ ./number_check.sh
Enter a number:
75
Large number!
$ ./number_check.sh
Enter a number:
30
Small number!
IF structure: if [ condition ]; then ... else ... fi
Use -gt for "greater than" comparison
Solution:
#!/bin/bash
echo "Enter a number:"
read num
if [ $num -gt 50 ]
then
echo "Large number!"
else
echo "Small number!"
fi
Create a simple password check system using string comparison.
$ ./password.sh
Enter password:
TechCorp2025
Access Granted
$ ./password.sh
Enter password:
wrong
Access Denied
For string comparison use: if [ "$var1" = "$var2" ]
Note: Use single = for string comparison in if statements
Solution:
#!/bin/bash
correct_pass="TechCorp2025"
echo "Enter password:"
read user_pass
if [ "$user_pass" = "$correct_pass" ]
then
echo "Access Granted"
else
echo "Access Denied"
fi
Use file test operators to check if a file exists before processing.
$ ./config_check.sh
# When file exists:
Configuration file found. Loading settings...
# When file doesn't exist:
Error: config.txt not found. Please create it first.
File test: if [ -f filename ] checks if file exists
The -f flag specifically checks for regular files
Solution:
#!/bin/bash
if [ -f config.txt ]
then
echo "Configuration file found. Loading settings..."
else
echo "Error: config.txt not found. Please create it first."
fi
Ready for the real challenge?
Now that you've warmed up with practice tasks, it's time for the main missions. These combine multiple concepts and simulate real-world scenarios you'll face as a system administrator.
Important: Complete missions in order - each one unlocks the next!
Your first task is simple but important. Create a script that welcomes new employees to TechCorp.
$ ./welcome.sh
What is your name?
Shaheer
Welcome to TechCorp, Shaheer! Let's automate the world together.
#!/bin/bash on the first line. This tells Linux to use Bash to run your script.
echo "Your message here" to display text to the user.
read variablename to get input from the user and store it in a variable.
$variablename. Your script structure should be:#!/bin/bash
echo "What is your name?"
read name
echo "Welcome to TechCorp, $name! Let's automate the world together."
Create a script that generates a quick system information report - something your manager checks every morning.
$ ./system_report.sh
=== System Report ===
Date: Thu Dec 19 2025
User: shaheer
System: TechCorp Linux Server
variablename=$(command)today=$(date)
whoami command shows the current logged-in user. Store it like: user=$(whoami)
#!/bin/bash
today=$(date)
user=$(whoami)
echo "=== System Report ==="
echo "Date: $today"
echo "User: $user"
echo "System: TechCorp Linux Server"
You need to create log files for server monitoring. These logs will track system activities throughout the day.
# After running your script, the server.log file should contain:
=== Server Log ===
[Current date and time]
Server Status: Online
[Username]
> creates or overwrites a file>> appends to a fileecho "text" > file.txt
> for the first line to create/overwrite the file:echo "=== Server Log ===" > server.log
>> for all subsequent lines:date >> server.logecho "text" >> server.logwhoami >> server.log
#!/bin/bash
echo "=== Server Log ===" > server.log
date >> server.log
echo "Server Status: Online" >> server.log
whoami >> server.log
echo "Log file created successfully"
TechCorp is creating an employee portal. You need to build an age verification script to ensure users meet the minimum age requirement of 18.
# Test Case 1:
$ ./age_check.sh
Enter your age:
25
Access Granted: Welcome to TechCorp Portal
# Test Case 2:
$ ./age_check.sh
Enter your age:
16
Access Denied: You must be 18 or older
if [ condition ]
then
commands
else
commands
fi
-ge means "greater than or equal to"-lt means "less than"[ $age -ge 18 ]
$age -ge 18#!/bin/bash
echo "Enter your age:"
read age
if [ $age -ge 18 ]
then
echo "Access Granted: Welcome to TechCorp Portal"
else
echo "Access Denied: You must be 18 or older"
fi
FINAL MISSION: Your most important task. TechCorp runs daily backups, but sometimes the backup file goes missing. Create a script to check if the backup exists before proceeding.
-f test# When file exists:
$ ./backup_check.sh
Enter backup filename to check:
backup.tar.gz
✅ SUCCESS: Backup file found. System is safe.
# When file doesn't exist:
$ ./backup_check.sh
Enter backup filename to check:
missing.txt
⚠️ WARNING: Backup file not found. Please create backup immediately!
-f filename checks if a file existsif [ -f $filename ]
echo "Enter backup filename to check:"
read filename
if [ -f $filename ]
then
# File exists message
else
# File not found message
fi
#!/bin/bash
echo "Enter backup filename to check:"
read filename
if [ -f $filename ]
then
echo "✅ SUCCESS: Backup file found. System is safe."
else
echo "⚠️ WARNING: Backup file not found. Please create backup immediately!"
fi