I am learning Shell Scripting and i got stuck that in most languages like C,C++, 0 means false and 1 means true, but in below shell script I am not able to understand, how the output is generated
if [ 0 ]
then
echo "if"
else
echo "else"
fi
No matter what i write inside if block like instead of 0, I tried 1,2,true,false it is always running if condition. How this works in shell scripting. And what shell script returns when the expression inside if statement is false.