
Fundamentals related to a bash builtin command named “test”
ABOUT test
test provides no output, but returns 0 for "true" (test successful) and 1 for "false" (test failed).
RELATED COMMAND LINE EXPOSURE
$num=10; if (test $num -gt 5); then echo "yes"; else echo "no"; fi yes $num=1; if (test $num -gt 5); then echo "yes"; else echo "no"; fi no $num=5; if (test $num -gt 5); then echo "yes"; else echo "no"; fi no $
Comments are closed.