I have begun sqlite using quite recently and have been impressed.
It's quite functional, small, and fully contained, just as
advertised.

My motivation for using sqlite is to pull information out of
a small database into a bash script, like so:

  res=$(echo $sql_cmd | sqlite example.db)

And it works nicely -- except if there is a .sqliterc in the home
folder.  Then the message about loading resources gets put into
`res`.  Since this in a script, I do not want to load a .sqliterc
file.  There does not seem to be a direct option for this.

I did find a work-around:

  res=$(echo $sql_cmd | sqlite -init "" example.db)

While that works, passing an empty string as an argument looks
very strange to me.  Also, this makes a strong assumption about
the behavior of the shell.

Are there other folks on the list using sqlite for a similar
purpose?  Is there a better approach to handle what I am trying to
do?

Thanks,

Andrew

Reply via email to