petern wrote: > $ echo "SELECT ('Shouldn''t SQLite shell continue interactively after > processing this statement?')msg;" >/tmp/slsh_in > $ > > Results at first terminal after echo line is sent from second terminal: > > $ #Interactively run sqlite3 from named pipe. > $ mkfifo /tmp/slsh_in > $ ./sqlite3 -interactive </tmp/slsh_in > SQLite version 3.19.3 2017-06-08 14:26:16 > Enter ".help" for usage hints. > sqlite> SELECT ('Shouldn''t SQLite shell continue interactively after > processing this statement?')msg; > Shouldn't SQLite shell continue interactively after processing this statement? > sqlite> > $ > > Apparently, from piped input with -interactive option, SQLite shell is > batch processing.
No; when in batch mode, sqlite3 would not output the banner. A read() on a pipe returns zero (instead of blocking) when the writing process has closed it. This means that after the echo has finished, sqlite3 detects an end-of-file, just as if you had pressed ^D interactively. To get what you want, you have to keep the pipe open for writing. Regards, Clemens _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users