Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions ebook/en/content/016-creating-an-interactive-menu-in-bash.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ At the beginning of your script add the following color functions:
##
green='\e[32m'
blue='\e[34m'
red='\e[31m'
clear='\e[0m'

##
Expand Down Expand Up @@ -127,8 +128,8 @@ $(ColorBlue 'Choose an option:') "
3) tcp_check ; menu ;;
4) kernel_check ; menu ;;
5) all_checks ; menu ;;
0) exit 0 ;;
*) echo -e $red"Wrong option."$clear; WrongCommand;;
0) exit 0 ;;
*) echo -e "${red}Wrong option.${clear}"; menu ;;
esac
}
```
Expand Down Expand Up @@ -165,7 +166,7 @@ Finally, we have a switch case which triggers a different function depending on
4) kernel_check ; menu ;;
5) all_checks ; menu ;;
0) exit 0 ;;
*) echo -e $red"Wrong option."$clear; WrongCommand;;
*) echo -e "${red}Wrong option.${clear}"; menu ;;
esac
```

Expand Down Expand Up @@ -236,6 +237,7 @@ function all_checks() {
##
green='\e[32m'
blue='\e[34m'
red='\e[31m'
clear='\e[0m'

##
Expand Down Expand Up @@ -267,7 +269,7 @@ $(ColorBlue 'Choose an option:') "
4) kernel_check ; menu ;;
5) all_checks ; menu ;;
0) exit 0 ;;
*) echo -e $red"Wrong option."$clear; WrongCommand;;
*) echo -e "${red}Wrong option.${clear}"; menu ;;
esac
}

Expand Down
Binary file modified ebook/en/export/introduction-to-bash-scripting-dark.pdf
Binary file not shown.
Binary file modified ebook/en/export/introduction-to-bash-scripting-light.pdf
Binary file not shown.
Binary file modified ebook/en/export/introduction-to-bash-scripting.epub
Binary file not shown.
Binary file modified ebook/en/export/sample-.introduction-to-bash-scripting-dark.pdf
Binary file not shown.
Binary file modified ebook/en/export/sample-.introduction-to-bash-scripting-light.pdf
Binary file not shown.