The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Linux Shell Scripting
- 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
Â
-----------