Added test() function to test output of bash conditions