Correct conditions, removed superfluous brackets
This commit is contained in:
parent
447de944e4
commit
3d839093e9
6
bash.md
6
bash.md
|
@ -368,8 +368,8 @@ Note that `[[` is actually a command/program that returns either `0` (true) or `
|
||||||
| `[[ -o noclobber ]]` | If OPTIONNAME is enabled |
|
| `[[ -o noclobber ]]` | If OPTIONNAME is enabled |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| `[[ ! EXPR ]]` | Not |
|
| `[[ ! EXPR ]]` | Not |
|
||||||
| `[[ X ]] && [[ Y ]]` | And |
|
| `[[ X && Y ]]` | And |
|
||||||
| `[[ X ]] || [[ Y ]]` | Or |
|
| `[[ X || Y ]]` | Or |
|
||||||
|
|
||||||
### File conditions
|
### File conditions
|
||||||
|
|
||||||
|
@ -401,7 +401,7 @@ fi
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Combinations
|
# Combinations
|
||||||
if [[ X ]] && [[ Y ]]; then
|
if [[ X && Y ]]; then
|
||||||
...
|
...
|
||||||
fi
|
fi
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue