denysdovhan / bash-handbook

:book: For those who wanna learn Bash

Home Page:https://git.io/bash-handbook

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

superflous semicolons

Leandros opened this issue · comments

In the if section many semicolons in the multiline examples are not required
Example:

# Single-line
if [[ 1 -eq 1 ]]; then echo "true"; fi;

# Multi-line
if [[ 1 -eq 1 ]]; then
  echo "true"; # <- not required
fi; # <- not required

Yep, it's not necessary, but I think it's a good practice, but I'll remove these semicolons to show that everyone can omit them.

Thank you for report!

I agree with @Leandros! Thanks @denysdovhan