0% found this document useful (0 votes)
5 views1 page

Bash Scripting Quiz

The document is a Bash scripting quiz that includes multiple-choice questions and practical scripting tasks. It asks participants to write scripts for checking website reachability, calculating annual salaries from monthly salaries, and pausing execution for a specified duration. Additionally, it includes questions about the functionality of specific Bash commands related to sleep and ping operations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

Bash Scripting Quiz

The document is a Bash scripting quiz that includes multiple-choice questions and practical scripting tasks. It asks participants to write scripts for checking website reachability, calculating annual salaries from monthly salaries, and pausing execution for a specified duration. Additionally, it includes questions about the functionality of specific Bash commands related to sleep and ping operations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Bash Scripting Quiz

Name: _________________________ ID: _________________________

Answer ONLY 2 MCQ

- Can you write a script that checks if a specific website (e.g., example.com) is reachable using ping

4 times?

- Can you make a script that reads a list of employee names and their monthly salaries, calculates

the annual salary, and saves it to a .txt file?

- Can you write a script that takes a number of seconds as input and pauses for that duration using

the sleep command?

What will the following command do: sleep 5 && echo "Done"?

A) Sleeps for 5 seconds, then prints "Done"

B) Prints "Done" immediately, then sleeps for 5 seconds

C) Causes a syntax error

D) Repeats "Done" 5 times

What will the following command do: ping -c 3 example.com?

A) Continuously pings example.com

B) Sends 3 ping requests to example.com and stops

C) Pings 3 different websites

D) Checks if example.com is a valid IP address

You might also like