From 642c22218e637aaacb68c372293eceb2a9b9e3a0 Mon Sep 17 00:00:00 2001 From: ColdBio <64978825+ColdBio@users.noreply.github.com> Date: Mon, 21 Mar 2022 14:22:50 +0000 Subject: [PATCH 1/2] Syntax highlighting was missing The switch case example (last example in this chapter) did not have syntax highlighting and improved the text returned when a car brand is provided by the user. --- ebook/en/content/010-bash-conditionals.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ebook/en/content/010-bash-conditionals.md b/ebook/en/content/010-bash-conditionals.md index 3b19984..e4603a6 100644 --- a/ebook/en/content/010-bash-conditionals.md +++ b/ebook/en/content/010-bash-conditionals.md @@ -132,29 +132,29 @@ A quick rundown of the structure: Here is an example of a Bash `case` statement: -``` +```bash #!/bin/bash -echo -n "Enter the name of a car brand: " -read car +read -p "Enter the name of your car brand: " car case $car in Tesla) - echo -n "${car}'s factory in the USA." + echo -n "${car}'s car factory is in the USA.'" ;; BMW | Mercedes | Audi | Porsche) - echo -n "${car}'s factory in Germany." + echo -n "${car}'s car factory is in Germany.'" ;; - Toyoda | Mazda | Mitsubishi | Subaru) - echo -n "${car}'s factory in Japan." + Toyota | Mazda | Mitsubishi | Subaru) + echo -n "${car}'s car factory is in Japan.'" ;; *) - echo -n "${car} is an unknown car brand." + echo -n "${car} is an unknown car brand" ;; + esac ``` From 8e9bec523d329a0ec5aa4d9c3b5e262c6a4ca6d8 Mon Sep 17 00:00:00 2001 From: Bobby Iliev Date: Mon, 21 Mar 2022 17:36:09 +0200 Subject: [PATCH 2/2] Update 010-bash-conditionals.md --- ebook/en/content/010-bash-conditionals.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ebook/en/content/010-bash-conditionals.md b/ebook/en/content/010-bash-conditionals.md index e4603a6..329af98 100644 --- a/ebook/en/content/010-bash-conditionals.md +++ b/ebook/en/content/010-bash-conditionals.md @@ -140,15 +140,15 @@ read -p "Enter the name of your car brand: " car case $car in Tesla) - echo -n "${car}'s car factory is in the USA.'" + echo -n "${car}'s car factory is in the USA." ;; BMW | Mercedes | Audi | Porsche) - echo -n "${car}'s car factory is in Germany.'" + echo -n "${car}'s car factory is in Germany." ;; Toyota | Mazda | Mitsubishi | Subaru) - echo -n "${car}'s car factory is in Japan.'" + echo -n "${car}'s car factory is in Japan." ;; *)