Shell question

Pete pete at mollysrevenge.com
Sun Jan 8 21:54:44 EST 2012


Hi Mark,
The program in question is sqlite3.  I'm trying to give it commands to
export an sqlite table in the form of INSERT commands.  The program is run
by typeing:

sqlite3 <dbname>

after it has started I need to feed it the following commands:

.mode sql
.output <outputfilename>
SELECT  whatever;
.exit

Those commands all work fine when typed into the program by me but nothing
is written to the output file if I redirect stdin to a file that contains
them.

Seems like that ought to work but I'll try the spawn/send/expect commands
and see if I can get them to work any better.

Pete

On Sun, Jan 8, 2012 at 6:06 PM, Mark Wieder <mwieder at ahsoftware.net> wrote:

> Pete-
>
> I've read through this a couple of times now trying to parse what
> you're trying to do. Here's my guess: you'd like to set up a text file
> of responses to prompts from the myProg program, which would be
> processed at the time myProg wants more input. If so, you should check
> out the "expect" command.
>
> --
> -Mark Wieder
>  mwieder at ahsoftware.net
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>


-- 
Pete
Molly's Revenge <http://www.mollysrevenge.com>



More information about the use-livecode mailing list