Basic Shell Scripting Create a script shell that processes the current time and displays 4 outputs as follows: i. Displays the current time in the format HH:MM:SS. Example: Today is 12:30:01 ii. Displays per current time element from midnight. Example : 12 hours 30 minutes 01 seconds elapsed from last midnight
Basic Shell Scripting Create a script shell that processes the current time and displays 4 outputs as follows: i. Displays the current time in the format HH:MM:SS. Example: Today is 12:30:01 ii. Displays per current time element from midnight. Example : 12 hours 30 minutes 01 seconds elapsed from last midnight
Chapter3: Performing Calculations With Formulas And Functions
Section: Chapter Questions
Problem 2.8CP
Related questions
Question
Basic Shell Scripting
Create a script shell that processes the current time and displays 4 outputs as follows:
i. Displays the current time in the format HH:MM:SS.
Example: Today is 12:30:01
ii. Displays per current time element from midnight.
Example : 12 hours 30 minutes 01 seconds elapsed from last midnight
iii. Displays per current time element until midnight.
Example : We will have 11 hours 29 minutes 59 seconds until next midnight
iv. Displays the numbers 1 to the difference of those hours on the same row separated
character tilde (~) except the last number.
example picture:
**note: save as time.sh or copy paste the script on your answer
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage