mercredi 4 mars 2015

Processing output from an sqlite db into a ksh array with spaces


I am querying an SQLite3 database like so:



input=$(-separator "," "SELECT field1,field2,field3 FROM table1")


and get this result:



Red,Yellow is a color,Blue


I need to insert this into an array, is there a way to set this result into an array in ksh without having the result return the field in quotation marks?


As in example:



IFS=','
set -A array $input


Aucun commentaire:

Enregistrer un commentaire