mysql output to an array for easy parsing.

2011-05-11 2 min read bash Database
Today I was looking for some way to put the output of the mysql output in an array in a bash script. Quick google search yeilded to results something like this: 1 <td> <div class="text codecolorer"> output=$(mysql -e "select * from table") </div> </td> </tr> The problem with the above approach is that all the words go into separate index. So if you have a line that has space then that is split into multiple index’s. Continue reading