Use of square brackets is necessary in bash for if statements.The basic syntax of if..then statement is:#!/bin/bashif [ condition ]then fi If you have many if statements(nested if) inside your script,then with proper indenting syntax is:#!/bin/bashif [ condition ]then if [ condition ] then fifi - Study24x7
Social learning Network

Warning: include(./views/auth.php): failed to open stream: Permission denied in /var/www/html/live/loginRightSlider.php on line 18

Warning: include(): Failed opening './views/auth.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/live/loginRightSlider.php on line 18
12 followers study24x7 03 Feb 2019 10:16 PM study24x7 study24x7

Use of square brackets is necessary in bash for if statements.
The basic syntax of if..then statement is:

#!/bin/bash
if [ condition ]
then
<commands>
fi

If you have many if statements(nested if) inside your script,then with proper indenting...

See more

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles