1#!/bin/sh 2# test -e alnum switch 3PATH=/bin:/usr/bin 4DBACL=$TESTBIN/dbacl 5 6prerequisite_command() { 7 type $2 2>&1 > /dev/null 8 if [ 0 -ne $? ]; then 9 echo "$1: $2 not found, test will be skipped" 10 exit 77 11 fi 12} 13 14prerequisite_command $0 grep 15 16DBACL_PATH="`pwd`/`basename $0 .sh`_`date +"%Y%m%dT%H%M%S"`" 17export DBACL_PATH 18 19mkdir "$DBACL_PATH" 20 21echo "123 xyz Hello234 %*# +123" \ 22 | $DBACL -l dummy -e cef 23head -3 "$DBACL_PATH/dummy" \ 24 | grep '# hash_size 15 features 2 unique_features 2 documents 0' \ 25 > /dev/null 26 27RESULT=$? 28rm -rf "$DBACL_PATH" 29 30exit $RESULT