Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Part 2 - Linux Shell Scripting - Worth 5 points. - NOT using editors, create a sh file named: program2.sh - Set this *.sh file
Part 2 - Linux Shell Scripting - Worth 5 points. - NOT using editors, create a sh file named: program2.sh - Set this *.sh file to: chmod 755 *.sh - NOT using editors, append your name, current date and time to a NEW file called results.txt - NOT using editors, append to the *.sh file, all the commands needed so that when you execute your sh file, this file will produce the following: How: - Ask the user to enter a number. - Verify that the number is between 1 and 100. - If the number is not between 1 and 100, then keep asking the user to enter a number until it is valid. - Use a for loop from 1 to the value entered by the user - Sum the results of calculating each number mod 5 - After the for loop ends, display the sum of all previous results and append it to the results.txt file as follows Sum of numbers is xxx
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started