This commit is contained in:
Rico Sta. Cruz 2017-08-25 18:43:44 +08:00
parent 073078cd22
commit bbba84e495
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
1 changed files with 10 additions and 8 deletions

18
sh.md
View File

@ -360,14 +360,6 @@ if [ -e "file.txt" ]; then
fi fi
``` ```
Numeric calculations
--------------------
```bash
$((RANDOM%=200)) # Random number 0..200
$((a + 200)) # $ is optional
```
Arrays Arrays
------ ------
@ -441,6 +433,16 @@ matches.
Miscellaneous Miscellaneous
------------- -------------
### Numeric calculations
```bash
$((a + 200)) # Add 200 to $a
```
```bash
$((RANDOM%=200)) # Random number 0..200
```
### Subshells ### Subshells
```bash ```bash