diff options
| author | mo <mo.khan@gmail.com> | 2019-05-25 19:41:46 -0600 |
|---|---|---|
| committer | mo <mo.khan@gmail.com> | 2019-05-25 19:41:46 -0600 |
| commit | 02ecd41ed4e6c07143fe817ec6b3b3fdd8a3e737 (patch) | |
| tree | 6395d0182e0f7b36df540d45161a266a5ff61c83 | |
| parent | 9508685fbd434d3bb2762c94ac425fa721f7915e (diff) | |
complete problem 13
| -rwxr-xr-x | bin/problem-13.sh | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/bin/problem-13.sh b/bin/problem-13.sh index b29cd4b..9322cd2 100755 --- a/bin/problem-13.sh +++ b/bin/problem-13.sh @@ -9,21 +9,39 @@ banner() { echo "Enter your option and hit <Enter>:" } -main() { - banner +quit() { + exit 0 +} +list() { + ls +} +print_date() { + date +} +logged_in() { + who +} +menu() { read option case "$option" in - d) date + d) print_date ;; - l) ls + l) list ;; - w) who + w) logged_in ;; - q) exit 0 + q) quit ;; esac - exit 0 +} + +main() { + while true; do + banner + menu + done + quit } main |
