rm test_result.txt cd lib/tests/ echo -e "begin test\n" echo -e "test -list\n" echo -e "-filter test\n" echo -e "-skiplists test\n" rm filter_test rm skiplist_test echo -e "build filter_test" g++ -O3 filter_test.cpp -o filter_test echo -e "build skiplist_test" g++ -O3 skiplist_test.cpp -o skiplist_test echo -e "test filter_test\n" ./filter_test if [ $? -eq 0 ]; then echo -e "test skiplist_test\n" ./skiplist_test # if [ $? -eq 0 ]; then # command3 # fi fi