ok got a new one for you guys since I figured out that last one on my own.
I got this command which works as needed BUT 2 things
1

How do I print the hostname BEFORE the results? As it is now it prints the results then the hostname, which is fine, but it would look better and be easier to read if it printed the hostname on the line above the results
2

how can I get it to NOT print the hostnames that do not match the query? As the command runs now it prints all the hostnames from the hostname file. I only want to print the hostnames with results.
command.
for i in `cat hostnames`; do ssh user@$i -C /command | grep something ; echo "$i" ; done;
ok made a script out of the command but it still returns the hostname after the results
for i in `cat hostnames`
do ssh user@$i -C /command | grep something
REMHOST=$i
echo "Host $REMHOST at IP $IP returned the following result:"
done
edit:
once again I think i figured it out myself.
for i in `cat hostnames`
do
echo "hostname $i returned the following results:"
ssh user@$i -C /command | grep something
done;
does that look like it would work? Ive tested it but not enough to know for sure.