Merge pull request #1397 from rajinder-yadav/patch-1
This commit is contained in:
commit
242c5bccbf
10
bash.md
10
bash.md
|
@ -368,13 +368,15 @@ Note that `[[` is actually a command/program that returns either `0` (true) or `
|
|||
| --- | --- |
|
||||
| `(( NUM < NUM ))` | Numeric conditions |
|
||||
|
||||
#### More conditions
|
||||
|
||||
| Condition | Description |
|
||||
| --- | --- |
|
||||
| -------------------- | ------------------------ |
|
||||
| `[[ -o noclobber ]]` | If OPTIONNAME is enabled |
|
||||
| --- | --- |
|
||||
| `[[ ! EXPR ]]` | Not |
|
||||
| `[[ X ]] && [[ Y ]]` | And |
|
||||
| `[[ X ]] || [[ Y ]]` | Or |
|
||||
| `[[ X && Y ]]` | And |
|
||||
| `[[ X || Y ]]` | Or |
|
||||
|
||||
### File conditions
|
||||
|
||||
|
@ -406,7 +408,7 @@ fi
|
|||
|
||||
```bash
|
||||
# Combinations
|
||||
if [[ X ]] && [[ Y ]]; then
|
||||
if [[ X && Y ]]; then
|
||||
...
|
||||
fi
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue