Skip to content

Commit 5f134d0

Browse files
ImKelpbobbyiliev
andauthored
Fixed missing syntax highlighting and return conditional text. (bobbyiliev#51)
* 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. * Update 010-bash-conditionals.md Co-authored-by: Bobby Iliev <bobby@bobbyiliev.com>
1 parent 1d37852 commit 5f134d0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

ebook/en/content/010-bash-conditionals.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -132,29 +132,29 @@ A quick rundown of the structure:
132132

133133
Here is an example of a Bash `case` statement:
134134

135-
```
135+
```bash
136136
#!/bin/bash
137137

138-
echo -n "Enter the name of a car brand: "
139-
read car
138+
read -p "Enter the name of your car brand: " car
140139

141140
case $car in
142141

143142
Tesla)
144-
echo -n "${car}'s factory in the USA."
143+
echo -n "${car}'s car factory is in the USA."
145144
;;
146145

147146
BMW | Mercedes | Audi | Porsche)
148-
echo -n "${car}'s factory in Germany."
147+
echo -n "${car}'s car factory is in Germany."
149148
;;
150149

151-
Toyoda | Mazda | Mitsubishi | Subaru)
152-
echo -n "${car}'s factory in Japan."
150+
Toyota | Mazda | Mitsubishi | Subaru)
151+
echo -n "${car}'s car factory is in Japan."
153152
;;
154153

155154
*)
156-
echo -n "${car} is an unknown car brand."
155+
echo -n "${car} is an unknown car brand"
157156
;;
157+
158158
esac
159159
```
160160

0 commit comments

Comments
 (0)