On Wed, 6 May 2009 23:01:24 +0200, Daniel Wolny
<[email protected]> wrote:

>Hi,
>Is possible to use sqlite in shell for loop?
>
>eg.
>#!/bin/sh
>
>for i in `sqlite db "SELECT smt FROM db"`
>do
>      echo "$i" DUPA
>done
>
>I want to act sqlite like any other command in for loop, i mean one
>record from db as a one iteration, above will display:
>
>first1 first2
>second1 second2 DUPA
>
>I want something like this:
>first 1 first2 DUPA
>second1 second2 DUPA

It should be possible, sqlite sends its output to stdout, so
it works like any other unix utility.

Just give it a go. Experiment.
And enjoy.

>Thanks in advance
-- 
  (  Kees Nuyt
  )
c[_]
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to