and statement in bash code example
Example: and in bash
Logical AND (&&)
if [1 -gt 0 ] && [ 2 -gt 1 ]; then
echo 1;
fi
Logical OR (||)
if [1 -gt 0 ] || [ 2 -gt 1 ]; then
echo 1;
fi
Logical AND (&&)
if [1 -gt 0 ] && [ 2 -gt 1 ]; then
echo 1;
fi
Logical OR (||)
if [1 -gt 0 ] || [ 2 -gt 1 ]; then
echo 1;
fi