Reputation: 10470
I have this script ...
#!/bin/sh
list=`/usr/bin/yasql user/xxxx@dev --batch` <<EOT
select h.hostname from host h, server s where s.id = h.id and s.server_type = 'DNS';
EOT
for i in $list
do
echo $i
done
But of course it does not work because I don't understand how to mix the HEREDOC with backticks ``
Upvotes: 2
Views: 644
Reputation: 361615
list=`/usr/bin/yasql user/xxxx@dev --batch <<EOT
select h.hostname from host h, server s where s.id = h.id and s.server_type = 'DNS';
EOT`
Upvotes: 2