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

ISQL: provide ability to run it with "-i <script>" switch but preventing from immediately quit to OS after <script> is completed (i.e. stay in its prompt) [CORE6369] #2345

Open
firebird-automations opened this issue Jul 23, 2020 · 5 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @pavel-zotov

It will be useful to have ability to do this:
isql -noquit -i some.sql
-- so that ISQL will stay after finish of some.sql (i.e. like it does when we launch ISQL w/o "-i" and perform this script using IN command).

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

Why it would be useful?

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

For example, when we need to run several ISQLs (at the same time) and perform some preparing scripts in each of them, and only after this - make futher actions.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

summary: ISQL: provide ability to run it from with "-i <script>" switch but preventing from immediately quit to OS after <script> is completed (i.e. stay in its prompt) => ISQL: provide ability to run it with "-i <script>" switch but preventing from immediately quit to OS after <script> is completed (i.e. stay in its prompt)

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

You can do this in the shell:

Windows: (echo input script.sql; && type con) | isql

Linux: (echo "input script.sql;" && cat) | isql

In Linux ISQL will behave weird and will not output prompts but in Windows looks ok.

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

Adriano,

muito obrigado!

Yes, it works on Windows (and mostly i'm working in this OS).
The only difference with usual way: one need to type 'quit;' twise and ISQL (or OS) writes then 'The process tried to write to a nonexistent pipe.".
But these are trifles.

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

No branches or pull requests

1 participant