`osqueryi` will take statements on the command lin...
# general
s
osqueryi
will take statements on the command line.
g
as one of of the command line. I see the ability with osqueryi to do a single query, but not a bunch in sequence.
s
Me neither. Can you use osqueryd and a config file?
b
you can do
osqueryi < my_file_containing_queries.txt
if the queries are
;\n
delimited
may not need the newline
s
You do need the newline. I made a test case, and forgot and didn’t followup. Thanks!
Copy code
$ echo -e "select 1;\n select 2;" | osqueryd -S --json
[
  {"1":"1"},
  {"2":"2"}
]
g
ah sweet, thanks y’all
s
I’d love to hear more about the use case. I think most of us assume this kind of thing happens via osqueryd, so when that’s not the case, I’d like to learn more about it
b
I've done it because it's easier to edit complex queries in my editor than in the sqlite/osqueryi interface
g
I only wanted to for benchmarking purposes. Easier to run it manually instead of timing it with the schedule interval
s
Ah, yeah…
I’ve been wanting to think about how to add more performance and benchmarking to the test suite