From dbdd5f1e25df195d189788d4d4b029754a338e44 Mon Sep 17 00:00:00 2001 From: Christoph Galuschka Date: Jan 10 2012 21:03:02 +0000 Subject: cleaned up some scripts using 'grep -cq' --> 'grep -q' where appropriate --- diff --git a/tests/p_freeradius/radiusd_test.sh b/tests/p_freeradius/radiusd_test.sh index 057933c..703abac 100755 --- a/tests/p_freeradius/radiusd_test.sh +++ b/tests/p_freeradius/radiusd_test.sh @@ -22,7 +22,7 @@ service radiusd restart #Run test t_Log "Running Test" -echo "User-Name=steve,Password=centos " | radclient -x localhost:1812 auth testing123 |grep -qc 'Access-Accept' +echo "User-Name=steve,Password=centos " | radclient -x localhost:1812 auth testing123 |grep -q 'Access-Accept' ret_val=$? # Restore settings diff --git a/tests/p_gcc/test_gcc.sh b/tests/p_gcc/test_gcc.sh index e1932e9..f22b69d 100755 --- a/tests/p_gcc/test_gcc.sh +++ b/tests/p_gcc/test_gcc.sh @@ -20,7 +20,7 @@ EOF gcc $FILE -o $EXE # run EXE -$EXE |grep -cq 'hello, centos' +$EXE |grep -q 'hello, centos' t_CheckExitStatus $? # remove files diff --git a/tests/p_openssl/10-openssl-cert-test.sh b/tests/p_openssl/10-openssl-cert-test.sh index 0c5a558..a8cdb97 100755 --- a/tests/p_openssl/10-openssl-cert-test.sh +++ b/tests/p_openssl/10-openssl-cert-test.sh @@ -93,7 +93,7 @@ fi ln -s $sslpath/certs/server.crt $sslpath/certs/${HASH}.0 #do verification -openssl verify /var/tmp/openssl-test/server.crt |grep -c -q OK +openssl verify /var/tmp/openssl-test/server.crt |grep -cq OK if [ $? == 1 ] then t_Log "Self signed Cert verification failed." ret_val=1 diff --git a/tests/p_python/10-test_python.sh b/tests/p_python/10-test_python.sh index 3694ba6..52f27ef 100755 --- a/tests/p_python/10-test_python.sh +++ b/tests/p_python/10-test_python.sh @@ -12,7 +12,7 @@ print "hello centos" EOF # Executing python -python $FILE | grep -cq "hello centos" +python $FILE | grep -q "hello centos" t_CheckExitStatus $?