capture console output

2010-04-22 Thread Billy Flatman
Hi all, I'd like to be able to capture the output from console after running a command. My Googling investigations have lead me to using 'popen'. FILE *file = popen(sqlite3 test.db .tables,r); However, I've not been able to read the information from the returned file. I know there are other

Re: capture console output

2010-04-22 Thread Dave Keck
FILE *file = popen(sqlite3 test.db .tables,r); However, I've not been able to read the information from the returned file. What exactly isn't working? Maybe this helps: NSString *fullPathToDatabase = @/Users/dave/test.db; NSTask *sqliteTask = [[NSTask alloc] init]; NSPipe

Re: capture console output

2010-04-22 Thread Billy Flatman
Hi Dave, Thanks for that, just what I was looking for. Cheers, Billy. On 22 Apr 2010, at 11:04, Dave Keck wrote: FILE *file = popen(sqlite3 test.db .tables,r); However, I've not been able to read the information from the returned file. What exactly isn't working? Maybe this helps: