Validate fundamentals from today β #!/bin/bash, echo/printf, read -r, variables, numeric validation, if/elif/else, while + for loops, sleep, date, and basic menu flow.
Write a script that:
- Has a banner and comments.
- Asks for name, age, and city (validate numeric age).
- Uses one of the numeric comparison operators β for example,
-ge. - Uses if/elif/else for decision-making.
- Shows a menu or list of options and handles invalid input.
- Simulates an order with sleep and prints time using date.
- Wraps the flow in a while loop so the user can repeat or exit.
- Ends with a closing message.
1οΈβ£ cat your_script.sh showing header + banner
2οΈβ£ ls -l your_script.sh (permissions)
3οΈβ£ Successful run with name, age, and choice
4οΈβ£ Invalid age β error
5οΈβ£ Invalid option β message
6οΈβ£ While loop repeat + exit
7οΈβ£ Sleep + date output
- Fork this repository (or download it and create your own repo).
- Add your completed
.shscript and screenshots (you can put them in a folder calledscreenshots/). - Commit and push your changes.
- Share your GitHub repo link in zbc_general chat under the assignment post.
- Add 2β3 short bullets: what worked, what was tricky, and one takeaway.
π Due: Before our next meeting.