Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inject current date when using www.mycli.net/commands ? #1172

Open
HtwoO opened this issue Aug 28, 2024 · 1 comment
Open

Inject current date when using www.mycli.net/commands ? #1172

HtwoO opened this issue Aug 28, 2024 · 1 comment

Comments

@HtwoO
Copy link

HtwoO commented Aug 28, 2024

Is it possible to inject current date/time when using https://www.mycli.net/commands

Concrete example, when exported data to a file:

tableformat csv; \once ~/data.dump.<generated.date>.csv;
select ... from ... where ...;
notee; tableformat ascii;

One would like to inject the current date/time into the filename, either by a SQL query like

select substring(now(), 1, 10);

or by mycli's system command and generate date from date command in the shell like the following

tableformat csv; \once ~/data.dump.$(system date +%F).csv;
...

Maybe it's supported, but not documented in a guide? I can not find an example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@HtwoO and others