mirror of
https://github.com/Idnan/bash-guide.git
synced 2018-11-09 02:29:39 +01:00
Added string tricks, fixed a few typos
This commit is contained in:
parent
efa24e5a24
commit
807e598c65
@ -13,7 +13,7 @@
|
|||||||
2.1. [Variables](#21-variables)
|
2.1. [Variables](#21-variables)
|
||||||
2.2. [Array](#22-array)
|
2.2. [Array](#22-array)
|
||||||
2.3. [String Substitution](#23-string-substitution)
|
2.3. [String Substitution](#23-string-substitution)
|
||||||
2.4. [Other String Tricks](#24-string-tricks)
|
2.4. [Other String Tricks](#24-other-string-tricks)
|
||||||
2.5. [Functions](#25-functions)
|
2.5. [Functions](#25-functions)
|
||||||
2.6. [Conditionals](#26-conditionals)
|
2.6. [Conditionals](#26-conditionals)
|
||||||
2.7. [Loops](#27-loops)
|
2.7. [Loops](#27-loops)
|
||||||
@ -1034,6 +1034,7 @@ case "$var" in
|
|||||||
#otherSubString is in variable
|
#otherSubString is in variable
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
```
|
||||||
|
|
||||||
## 2.5. Functions
|
## 2.5. Functions
|
||||||
As in almost any programming language, you can use functions to group pieces of code in a more logical way or practice the divine art of recursion. Declaring a function is just a matter of writing function my_func { my_code }. Calling a function is just like calling another program, you just write its name.
|
As in almost any programming language, you can use functions to group pieces of code in a more logical way or practice the divine art of recursion. Declaring a function is just a matter of writing function my_func { my_code }. Calling a function is just like calling another program, you just write its name.
|
||||||
|
Loading…
Reference in New Issue
Block a user