user1234 revised this gist . Go to revision
1 file changed, 18 insertions
some.sh(file created)
@@ -0,0 +1,18 @@ | |||
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 |
Newer
Older