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 <[email protected]> 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 > [email protected] > > > _______________________________________________ > use-livecode mailing list > [email protected] > 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> _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
