|
|
|
|
|
|
|
|
|
|
|
|
Re: SQL*Plus - simulate "echo -n" (prompt with no newline) [message #634495 is a reply to message #634493] |
Tue, 10 March 2015 16:28 |
|
Michel Cadot
Messages: 68733 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Could be a solution if you have only one or a couple of called scripts.
In my case there are a bunch of them and they depend on parameters, environment, execution of previous scripts in the global one.
So currently I have something like:
executing X1, log file is Y1...
executing X2, log file is Y2...
executing X5, log file is Y5...
...
I want to add a short feedback from the called scripts something like:
executing X1, log file is Y1... <done or W1 warnings, E1 errors or "condition Z1 is met"...>
executing X2, log file is Y2... <done or W2 warnings, E2 errors or "condition Z2 is met"...>
executing X5, log file is Y5... <done or W5 warnings, E5 errors or "condition Z5 is met"...>
...
which will allow the operator to see the evolution of the scripts, if he has to investigate in some logs and/or why the next is X5 and not X3... and if he has to stop or undo what some scripts have done in case of errors.
Some scripts take a few seconds, others may last an hour or more, so the operator can't always be there to follow all the messages that will appear at the top of his screen.
But this is an idea, I will check if I can use some control characters to move the cursor one line up (instead of clearing the screen) and prompt the whole message.
Unfortunately, I will be at this client site only next Monday to test if this is possible within SQL*Plus in his environment, I know it is possible at shell level as I already did it; the terminal they use accepts ANSI escape codes.
Thanks for the idea.
[Updated on: Tue, 10 March 2015 16:33] Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: SQL*Plus - simulate "echo -n" (prompt with no newline) [message #634737 is a reply to message #634543] |
Sat, 14 March 2015 05:15 |
|
Michel Cadot
Messages: 68733 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Littlefoot, it works well on Windows and using ANSI escape codes as I show above, if you use ANSICON instead of CMD.EXE.
More specifically, once ANSICON installed, you create a shortcut on your desktop, for instance, and put "%SystemRoot%\system32\cmd.exe /C ansicon" in the command line (or you can set it permanently using cmd.exe Autorun registry value).
Note: I tested it against virus, malware, adware, found nothing but make your own test.
[Updated on: Sat, 14 March 2015 05:16] Report message to a moderator
|
|
|
|
|
|