Open main menu

CDOT Wiki β

Changes

Tutorial12: Shell Scripting - Part 2

6 bytes added, 09:24, 4 May 2021
LINUX PRACTICE QUESTIONS
# Create a Bash shell script called '''retire.bash''' that when run, clears the screen, and then prompts the user for their age. If the age entered is less than 65, then display a message that the person is NOT eligible to retire. If the age is equal to 65, then display a message that the person just turned 65 and can retire. If the age is greater than 65, then display the message that the user is over 65 and why have they not have already retired already?<br><br>
# Add code to the '''retire.bash''' script created in the previous question to force the user to enter only an '''integer''' to provide error-checking for this shell script.<br><br>
# Write code for a Bash shell script that will prompt the user for a valid POSTAL CODE'''VALID postal code'''.<br>A valid postal code consists of the following format: x#x #x#<br>where X represents an upper or lowercase letter<br>and # represents a number from 0-9<br><br>'''NOTE:''' A VALID postal codes can consist of no spaces or one or more spaces in the format shown above.<br><br>If the user enters an INVALID postal code, indicate an error and allow the user to enter the VALID postal code. When the user enters a VALID postal code, then clear the screen and display the VALID postal code.<br><br>
# What is the purpose of the '''/etc/profile''' startup file?<br><br>
# What is the purpose of the '''/etc/bashrc''' startup file?<br><br>
13,420
edits