[Clip] Re: ^$getoutput()$ question
- --- In firstname.lastname@example.org, junja <junja@...> wrote:
>If mysql sends messages to STDOUT this is what these clip functions
> c_j_ackson wrote:
> > When I try, "^$getdosoutput("mysql")$", there is this error message:
> > No output produced by "c:\windows\system32\cmd.exe" /c mysql"
> I don't know mysql but if it's like the average db software,
> it won't give any output unless you tell it what you want.
> Which includes opening the db you want then extracting
> the stuff you want from it.
capture the STDOUT
But these clip functions can only capture *after* the clip is launched
and on through to the end of the clip run and *without* any user
interactivity in between the start and finish of clip's run as far as
the entered command and captured output goes.
This means you must enter one command or a series of commands in the
clip and then *at_once* (a once only) capture the output of that for
there is no (no interactive way of) entering a command and then
sending some more commands with capture in between of each sent command.
But if you desire to do that latter: DOS language can used to
redirect STDOUT to a file (rather than the default of to console window).
I only know how to live monitor such (redirected to) file in Linux it
is the tail command will in realtime, live monitor and display
additions as they append/accrue to that file.
If there exists a way to do this in Win (reload file in editor?) then
you have a way of viewing (and saving) the captured STDOUT
- Thanks for all who responded to my question.
I found a way to gather database table data from MySQL to Notetab that
bypasses manually typing in a command prompt. It involves creating a
text file that lists MySQL commands.
Here is the NoteTab Code:
^!info $getdosoutput(mysql [database name] < [filename path])$
Here is the contents of a sample text file refered to in the Notetab
use local_files; #"local_files" is the database name
select * from content; #"content" is the table name
- Thanks for sharing this. Oddly enough I only can get it to work with
> Here is the NoteTab Code:
> ^!info $getdosoutput(mysql [database name] < [filename path])$
> Here is the contents of a sample text file refered to in the
> ---------start code----------
> use local_files; #"local_files" is the database name
> select * from content; #"content" is the table name
> ---------end code-------------