Comments on: How to Use Conditional Statements in Bash Script https://www.linuxtechi.com/shell-scripting-checking-conditions-with-if/ Tue, 04 Oct 2022 03:32:49 +0000 hourly 1 By: Pard https://www.linuxtechi.com/shell-scripting-checking-conditions-with-if/#comment-194 Tue, 11 Nov 2014 11:49:53 +0000 http://www.linuxtechi.com/?p=2669#comment-194 You don’t need to use the bracket, if works without them, it’s a statement to check if the condition is true

]]>
By: Tomas https://www.linuxtechi.com/shell-scripting-checking-conditions-with-if/#comment-192 Tue, 28 Oct 2014 11:48:50 +0000 http://www.linuxtechi.com/?p=2669#comment-192 I’d suggest you to surround variables with “” by default, because if $number isn’t declared or has a space in it, bash will throw a syntax error.

]]>