I couldn't get the result I wanted when I used if[..] in the if structure in bash script. I was told to use if[[..]] but the reason was not explained. What is the difference if[..] and if[[..]] ?
Example;
while true; do
...
...
...
if [[ $warn = "error" ]]
then
...
...
...