mirror of
https://github.com/dylanaraps/pure-sh-bible
synced 2024-05-17 21:06:36 +02:00
Fix confusing substring examples
The placeholders do not work since `sub_string2` contains `sub_string` and give the impression of fall-through statements.
This commit is contained in:
parent
4011d6482b
commit
d5a96302f6
12
README.md
12
README.md
|
@ -193,12 +193,12 @@ John Black is my name.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
case $var in
|
case $var in
|
||||||
*sub_string*)
|
*sub_string1*)
|
||||||
# Do stuff
|
# Do stuff
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*sub_string2*)
|
*sub_string2*)
|
||||||
# Do more stuff
|
# Do other stuff
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
@ -213,12 +213,12 @@ esac
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
case $var in
|
case $var in
|
||||||
sub_string*)
|
sub_string1*)
|
||||||
# Do stuff
|
# Do stuff
|
||||||
;;
|
;;
|
||||||
|
|
||||||
sub_string2*)
|
sub_string2*)
|
||||||
# Do more stuff
|
# Do other stuff
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
@ -233,12 +233,12 @@ esac
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
case $var in
|
case $var in
|
||||||
*sub_string)
|
*sub_string1)
|
||||||
# Do stuff
|
# Do stuff
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*sub_string2)
|
*sub_string2)
|
||||||
# Do more stuff
|
# Do other stuff
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
|
Loading…
Reference in a new issue