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
study24x7

Default error msg

Login

New to Study24x7 ? Join Now
Already have an account? Login
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