Closed LuisBL closed 3 months ago
The closer I get is:
sq:northwind.db=> \p
Query buffer is empty.
sq:northwind.db=> \! cat input.sql
\echo ====== test to pipe in out from usql
\d Regions
sq:northwind.db=> \i input.sql
====== test to pipe in out from usql
TABLE "Regions"
Name | Type | Nullable | Default
-------------------+---------+----------+---------
RegionDescription | TEXT | "NO" |
RegionID | INTEGER | "NO" |
sq:northwind.db=> \o output.txt
sq:northwind.db=> \! wc -l output.txt
0 output.txt
sq:northwind.db=> \i input.sql
====== test to pipe in out from usql
TABLE "Regions"
Name | Type | Nullable | Default
-------------------+---------+----------+---------
RegionDescription | TEXT | "NO" |
RegionID | INTEGER | "NO" |
sq:northwind.db=> \! wc -l output.txt
0 output.txt
sq:northwind.db=>
no way to send the result of the execution of input.sql to output.txt
Can you describe your use case more, why you want to save this output to a file?
It's to keep a trace of the full session in a text file
Why do you want that? It's not a regular session, as you don't see the output.
Does that make sens or is there a more natural way to do this ?