> may need ability to run bash commands and assign result to a column. For example: > UPDATE result SET nRows =` wc -l fileNames` ;
Might be easier to run Bash commands in Bash; write the results to a file and then redirect the file into SQLite. See for example, this Nabble thread. http://sqlite.1065341.n5.nabble.com/How-accept-sqlite3-commands-from-stdin-td38710.html Jim Callahan Orlando, FL On Wed, Jan 11, 2017 at 4:23 PM, Roman Fleysher < roman.fleys...@einstein.yu.edu> wrote: > Dear SQLites, > > I am using exclusively sqlite3 shell for all the processing and may need > ability to run bash commands and assign result to a column. For example: > > UPDATE result SET nRows =` wc -l fileNames` ; > > Here I used `` as would be in bash for command substitution. This would > run wc command (word count), count number of lines in each file listed in > column fileNames and update the row correspondingly. > > As far as I understand I should be able to write loadable extension to > accomplish this. My questions are: > > 1. Given that I use sqlite3 shell exclusively, does this path makes sense? > If path should be different, what is it? > 2. If loadable extension is good way to go, is there an example that I > could use given that I have zero knowledge of sqlite's internals? > > 3. Maybe mixing SQL and shell commands (different syntaxes) is > linguistically inappropriate and thus difficult? > > Thank you, > > Roman > > > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users