How to return a message after command runs?

I have a script like this:

echo "enter filername in lowercase"
                read -e filername exec 2>&1
                echo "type the start date in format MM/DD/YYYY"
                read -e startdate exec 2>&1
                echo "enter the end date in format MM/DD/YYYY"
                read -e enddate exec 2>&1
                echo "please enter the path of file"
                read -e filepath exec 2>&1
[ $(echo $filepath | egrep -c '^\/*\/.*[\/]$') -ne 0 ] && echo " enter path without trailing slash" && read filepath
command=`/local/mnt/script.host.pl -client=$filername -start=$startdate -end=$enddate -show_files -filename=$filepath\
|gawk '{print $1, $11}'  |grep -v HOSTNAME | grep -vi Totals |uniq`
echo $command; if [[ "$command" == "No" ]]; then echo "yes";fi

I am trying to get it to return "yes" but all I get is no output

The command does actually return the word No. So I am trying to get it to echo "yes."

You get no output, at all? Something in that huge pipe-chain is messing up.

What does

/local/mnt/script.host.pl -client=$filername -start=$startdate -end=$enddate -show_files -filename=$filepath

print, and what output do you want from it?

The command returns data when there is data. However, when it does not have data, it just prints No. I was trying to run a test to see if I could have the script produce a customer message, like "There is no data, try another date." I am sorry I put echo "yes" in the script, for this is deceiving. I really wanted it to print out a message such as "there is no data." I can't get it to print any customer message at this point, it just prints "No."

---------- Post updated at 03:14 PM ---------- Previous update was at 03:10 PM ----------

I think I have found the problem. Looks like part of the script was truncated when I was testing and I need to add the lines and retest it.