[GTALUG] capturing the output of any program and inserting in db

Dave Cramer davecramer at gmail.com
Wed Oct 29 16:22:14 UTC 2014


Myles, that is pretty much all I need, thx.

Others, syslog is fine, but I want an easy way to view the results other
than grep

Dave

Dave Cramer

On 29 October 2014 12:13, Myles Braithwaite <me at mylesbraithwaite.com> wrote:

> Dave Cramer wrote:
> > Is there anything out there that is written simply ? By this I mean I
> > don't want to have to install a framework or a jvm or any large
> > dependencies. Ideally this would be written in bash or the like.
>
> You could use the sqlite. Running something like:
>
> #!/bin/sh
> sqlite3 log.db 'INSERT INFO log (message) VALUES ($MESSAGE);'
>
> in a table setup like this:
>
> CREATE TABLE log (
>         id INTEGER PRIMARY KEY,
>         timestamp DATETIME DEFAULT CURRENT_TIMESTAMP,
>         message TEXT
> );
>
>
> ---
> GTALUG Talk Mailing List - talk at gtalug.org
> http://gtalug.org/mailman/listinfo/talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/talk/attachments/20141029/ef36d955/attachment.html>


More information about the talk mailing list