Merge pull request #1397 from rajinder-yadav/patch-1

This commit is contained in:
Rico Sta. Cruz 2020-06-13 10:16:20 +10:00 committed by GitHub
commit 242c5bccbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 8 deletions

10
bash.md
View File

@ -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
```