bash: Correct mistakes at $RANDOM (#1147)

- using `=` just throws an error!
- `200` limits the result to 200 possible numbers starting with 0! so the maximum is 199.
- added `$` straight before `RANDOM` to be on the safe side.
This commit is contained in:
DJCrashdummy 2020-08-03 14:31:11 +02:00 committed by GitHub
parent 692375e0fc
commit 8747708136
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -623,7 +623,7 @@ $((a + 200)) # Add 200 to $a
```
```bash
$((RANDOM%=200)) # Random number 0..200
$(($RANDOM%200)) # Random number 0..199
```
### Subshells