From 3d839093e95dc82f6d71d1821dc411a6ec544eba Mon Sep 17 00:00:00 2001 From: Rajinder Yadav Date: Wed, 1 Apr 2020 07:44:50 -0400 Subject: [PATCH] Correct conditions, removed superfluous brackets --- bash.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bash.md b/bash.md index 001186ee6..c1a051f1e 100644 --- a/bash.md +++ b/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 | | --- | --- | | `[[ ! EXPR ]]` | Not | -| `[[ X ]] && [[ Y ]]` | And | -| `[[ X ]] || [[ Y ]]` | Or | +| `[[ X && Y ]]` | And | +| `[[ X || Y ]]` | Or | ### File conditions @@ -401,7 +401,7 @@ fi ```bash # Combinations -if [[ X ]] && [[ Y ]]; then +if [[ X && Y ]]; then ... fi ```