Scipt:
When executed gives the following error:Code:#!/bin/bash cmd='sqlite3 test.db "select col1, col2 from table1;"' result=$($cmd) # doesn't work #result=$(sqlite3 test.db "select col1, col2 from table1;") # this works when uncommented echo $result
However if I uncomment line 4 it works fine.Code:sqlite3: Error: too many options: "col1," Use -help for a list of options.
Bookmarks