Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Linux Take a screenshot of the shell script and the output of the shell script and paste 1 . Download the archive ( midterm .

Linux
Take a screenshot of the shell script and the output of the shell script and paste
1. Download the archive (midterm.zip) into your Virtual Machine (VM) from course shell and move the zipped file to Documents folder from the Downloads folder. Navigate to Documents folder and extract the contents using the command unzip -d midterm midterm.zip. Navigate to the midterm folder and display the contents. All the scripts in the following task should be created and executed in this folder.
Add screenshot of the command used and the output (the unzipped archive contents) here.
2. Create a script called q1.sh that takes an argument from the user. If the first argument is "linux", it should print Linux is an open-source operating system. If the first argument is "windows", it should print Windows is an operating system developed by Microsoft. If the first argument is anything other than linux or windows, print Information about this operating system is not available. Execute the script three times to show all the different outputs.
Add screenshot of the shell script and the output here
3. Create a script called q2.sh that displays the names of all the items in the current folder and specifies if it is empty or not-empty.
Add screenshot of the shell script and the output here
4. Create a script called q3.sh that prompts the user to enter a number (the number should not be accepted as argument). Do the following:
a. Display if the number is even or odd.
b. Multiply the number by itself and display the product.
c. Add the number to itself and display the sum.
Execute the script two times. Once with an even number as input and the other an odd number as input.
Add screenshot of the shell script and the output here
5.Create a script called q4.sh that does the following for the employees listed in the file employee.csv in the archive:
a. Use a command to calculate and display the total number of employees. (Hint: Dont count the header line containing the labels in the file)
b. Use a command to calculate and display the number of employees in the HR department.
c. Display a sorted list of the employees such that the people who have been at the company the longest (shown by Years of service column) are at the top and new employees at the bottom.
Add screenshot of the shell script and the output here

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Does it have correct contact information?

Answered: 1 week ago