please help me to modify my script
#! /bin/bash
while read line
do
echo "$line" >>/tmp/result && mysql -ss -e "use $line; select count(*) from users where type='admin' and deleted = 0;" > /tmp/result;
done < /tmp/db_data
cat result
alan_hardwsdefs
2
bgrmods
2
claudiatdsefs
1
derek_dbdmma
3
Is there a way to print the output in same lines
Need a result like this
alan_hardwsdefs 2
bgrmods 2
claudiatdsefs 1
derek_dbdmma 3