From 6237c81e2ae942aae9c4194a34734ae3bdc19be7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Fri, 27 Sep 2024 14:42:10 -0600 Subject: [PATCH] Fix the syntax in if_else.sh The test script `if_else.sh` has incorrect syntax for an if statement: $ bash if_else.sh if_else.sh: line 2: syntax error near unexpected token `then' if_else.sh: line 2: `if [[ $FOO -eq 1 ]] then' The correct syntax uses `;` before `then`. --- scripts/if_else.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/if_else.sh b/scripts/if_else.sh index f3fd04f..ddb39d1 100644 --- a/scripts/if_else.sh +++ b/scripts/if_else.sh @@ -1,8 +1,8 @@ FOO=2 -if [[ $FOO -eq 1 ]] then +if [[ $FOO -eq 1 ]]; then echo "FOO is 1" -elif [[ $FOO -eq 2 ]] then +elif [[ $FOO -eq 2 ]]; then echo "FOO is 2" else echo "FOO is not 1 or 2" -fi \ No newline at end of file +fi