You should do for i in $HANDLER
Notice: NO quotes. Though be careful - it will not work if row contains text field with spaces. Pavel On Wed, May 6, 2009 at 5:24 PM, Daniel Wolny <[email protected]> wrote: > 2009/5/6 Kees Nuyt <[email protected]>: >> On Wed, 6 May 2009 23:01:24 +0200, Daniel Wolny >> <[email protected]> wrote: >> 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. >> > > It doesn't work to me: > > #!/bin/sh > > HANDLER=`sqlite -noheader /root/adm/var/database/vhosts "SELECT * FROM > vhosts WHERE login='nightwalker';"` > > for i in "$HANDLER" > do > echo "$i" dupa > done > > Result: > 1|nightwalker|nightwalker.szelka.net|1 > 3|nightwalker|stolezka.pl|1 > 4|nightwalker|czteroipolkilogramowyarbuz.pl|1 > 259|nightwalker|satan.edu.pl|1 > 260|nightwalker|prison.net.pl|1 dupa > _______________________________________________ > sqlite-users mailing list > [email protected] > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

