{"id":443,"date":"2024-04-21T18:05:32","date_gmt":"2024-04-21T18:05:32","guid":{"rendered":"https:\/\/sites.wp.odu.edu\/odu-student-template\/?p=443"},"modified":"2024-04-21T18:05:32","modified_gmt":"2024-04-21T18:05:32","slug":"assignment-9","status":"publish","type":"post","link":"https:\/\/sites.wp.odu.edu\/odu-student-template\/2024\/04\/21\/assignment-9\/","title":{"rendered":"Assignment 9"},"content":{"rendered":"\n<p>Task-A: Write a shell script to complete the following steps:<\/p>\n\n\n\n<ol>\n<li>Prompt the user to input his\/her lucky number.<\/li>\n\n\n\n<li>If the input number is equal to 10, then print the message \u201cYou got the first prize.\u201d<\/li>\n\n\n\n<li>If the input number is equal to 8, then print the message \u2013 \u201cYou got the second prize.\u201d<\/li>\n\n\n\n<li>If the input number is equal to 999, then print the message \u2013 \u201cYou got the third prize.\u201d<\/li>\n\n\n\n<li>If None of the above conditions are true, then print the message \u2013 \u201cSorry, good Luck for the next time.\u201d<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/sites.wp.odu.edu\/odu-student-template\/wp-content\/uploads\/sites\/34684\/2024\/04\/image-37.png\"><img loading=\"lazy\" decoding=\"async\" width=\"780\" height=\"513\" src=\"https:\/\/sites.wp.odu.edu\/odu-student-template\/wp-content\/uploads\/sites\/34684\/2024\/04\/image-37.png\" alt=\"\" class=\"wp-image-492\" style=\"width:840px;height:auto\" srcset=\"https:\/\/sites.wp.odu.edu\/odu-student-template\/wp-content\/uploads\/sites\/34684\/2024\/04\/image-37.png 780w, https:\/\/sites.wp.odu.edu\/odu-student-template\/wp-content\/uploads\/sites\/34684\/2024\/04\/image-37-300x197.png 300w, https:\/\/sites.wp.odu.edu\/odu-student-template\/wp-content\/uploads\/sites\/34684\/2024\/04\/image-37-768x505.png 768w\" sizes=\"(max-width: 780px) 100vw, 780px\" \/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Task-B: Write a shell script to validate your input.<\/p>\n\n\n\n<ol>\n<li>Prompt the user to provide the username which should consists of characters and numbers both, and check if the following requirements are satisfied:<\/li>\n\n\n\n<li>Only lower-case letter [a-z] and numeric character [0-9] are allowed.<\/li>\n\n\n\n<li>The length must be between 4 to 8 digits<\/li>\n<\/ol>\n\n\n\n<p><\/p>\n\n\n\n<p>Test your script with the following inputs, and submit the screenshot for the script and all the Four outputs:<\/p>\n\n\n\n<ol>\n<li>Your input with one upper case<\/li>\n\n\n\n<li>The input has length less than 4 digits.<\/li>\n\n\n\n<li>The input has length larger than 8 digits.<\/li>\n\n\n\n<li>Your input in lower case and should have length between 4 to 8.<\/li>\n<\/ol>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Task-A: Write a shell script to complete the following steps: Task-B: Write a shell script to validate your input. Test your script with the following inputs, and submit the screenshot for the script and all the Four outputs:<\/p>\n","protected":false},"author":27037,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","wds_primary_category":0},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/sites.wp.odu.edu\/odu-student-template\/wp-json\/wp\/v2\/posts\/443"}],"collection":[{"href":"https:\/\/sites.wp.odu.edu\/odu-student-template\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sites.wp.odu.edu\/odu-student-template\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sites.wp.odu.edu\/odu-student-template\/wp-json\/wp\/v2\/users\/27037"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.wp.odu.edu\/odu-student-template\/wp-json\/wp\/v2\/comments?post=443"}],"version-history":[{"count":3,"href":"https:\/\/sites.wp.odu.edu\/odu-student-template\/wp-json\/wp\/v2\/posts\/443\/revisions"}],"predecessor-version":[{"id":507,"href":"https:\/\/sites.wp.odu.edu\/odu-student-template\/wp-json\/wp\/v2\/posts\/443\/revisions\/507"}],"wp:attachment":[{"href":"https:\/\/sites.wp.odu.edu\/odu-student-template\/wp-json\/wp\/v2\/media?parent=443"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.wp.odu.edu\/odu-student-template\/wp-json\/wp\/v2\/categories?post=443"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.wp.odu.edu\/odu-student-template\/wp-json\/wp\/v2\/tags?post=443"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}