The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 01-06-2009
Panos1962 Panos1962 is offline
Registered User
  
 

Join Date: Dec 2008
Location: Thessaloniki, GREECE
Posts: 29
The only thing you have to do is check the ${connect1} value before printing it:
Code:
if [ -n "${connect1}" ]; then
    echo "${connect1}"
else
    echo "No rows returned"
fi
instead of just:

Code:
echo "${connect1}"