litecli icon indicating copy to clipboard operation
litecli copied to clipboard

Feature request: sqlite3 .output compatibility

Open t3h2mas opened this issue 4 years ago • 1 comments

It would be great to be able to save query results using litecli. Currently, my workflow involves copying a query from litecli and using sqlite3 to get a csv.

Similar to the following in sqlite3

.mode csv
.output results.csv
...

t3h2mas avatar Apr 15 '21 23:04 t3h2mas

There is a tee command available that will write the query and the results to a specified file. Here's an equivalent workflow.

.mode csv
tee filename.csv

Unfortunately this won't save just the output it will also include the query itself.

You can turn off the output to file using notee command.

amjith avatar Apr 16 '21 01:04 amjith