1 | #!/bin/bash |
2 | |
3 | fruit="apple" |
4 | |
5 | case $fruit in |
6 | "apple") |
7 | echo "This is a red fruit." |
8 | ;; |
9 | "banana") |
10 | echo "This is a yellow fruit." |
11 | ;; |
12 | "orange") |
13 | echo "This is an orange fruit." |
14 | ;; |
15 | *) |
16 | echo "Unknown fruit." |
17 | ;; |
18 | esac |
19 |