Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please Refer to the slides for week - 8 - Shell scripting and write shell scripts to complete the following tasks. Submit the screenshot for
Please Refer to the slides for weekShell scripting and write shell scripts to complete the
following tasks. Submit the screenshot for the script and its output, both.
NOTE: Please replace the name of the script with the name you used for the script. In the
sample screenshot, I have used those names to create my script.
Step: Use vi or nano editor to write your script Ex nano YourScriptName.sh for the
following tasks.
Step: After saving the script, save and exit out of the editor and make the script executable by
adding execute permission chmod x YourScriptName.sh
Step: Run your script using YourScriptNamesh
Task A Correct script points resultoutput after executing the script
points Conditional Statement
Write a shell script using nano or vi editor eg nano scriptname.sh like below, that performs
the following task:
Add the Shebang #binbash as the first line in your script.
Read a number using read function
Using if statement, check if the input number is less than then print the message
Input number is greater than
If the number is not greater than then print the message, Input number is not
greater than
Your script should result into the output similar to this sample screenshot after executing as
shown below
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