run sql/queries (postgres) within bash
e.g.
for things-to-buy in $(psql -d database-name -U username -c “select item from glossaries where priority = ‘urgent’ “;
do
blah, blah, blah …
done
e.g.
for things-to-buy in $(psql -d database-name -U username -c “select item from glossaries where priority = ‘urgent’ “;
do
blah, blah, blah …
done
you can also do the following:
echo “select * from cibailanjio” | mysql -uroot -p