here's what i'm trying to achive:
function f1() {
return 0
}
function f2() {
return 0
}
if [[ f1 && f2 ]]; then
echo "success"
else
echo "fail"
fi
You don't use [[
(or [
) when running a command and checking the result code.
if f1 && f2 ; then
echo "success"
else
echo "fail"
fi