|
|
|||||||
This one has come up in these forums a few times. I've been toying with the idea of using KiXtart as a scripting language for Nagios nrpe_nt. Unfortunately the plugins are required to output to the standard console window (not Ruud's emulation of the same). At the moment I have to use workarounds like this: code:REM cpu.cmd code:when all I want to do is write to stdout!; cpu.kix Arrrgh! Ruud, this would be so useful! We could then do code:or better stillkix32 stuff.kix > kixout.txt code:Please please please give us a simple and effective way of writing to the real CON from KiXtart.kix32 stuff.kix | fancyprogram.exe Thanks in advance (but not holding my breath) Phil [ 03. June 2003, 14:10: Message edited by: PRandal ] |
||||||||
|
|
|||||||
The good news is than you can do this. Hurrah. Add these two lines at the start of your script: code:Now, you can pipe the output:$=SetOption("ASCII","ON") code:Or even redirect it to the console:kix32.exe myscript.kix | more code:You will notice that outputting directly to the console is not particularly useful as control characters do not get handled.kix32.exe myscript.kix >CON: |
||||||||
|
|
|||||||
Thanks, that works perfectly. Phil |
||||||||
|
|
|||||||
w0w! what those 2 lines have to do with the piping itself? as far as I see it, they are just formatting commands, no? |
||||||||
|
|
|||||||
It was Phils comment about the console being "Ruud's emulation" that sent me down this path.
|
||||||||
|
|
|||||||
very nice, very, very nice. this should be documented and highlited seperately in the kixtart manual. |
||||||||
|
|
|||||||
Or at least in the FAQ here on the board. Kent, Les Can one of you guys look at adding this to either one of the other FAQs or one of its own. Thanks. |
||||||||
|
|
|||||||
DOC, It was your idea... you do it! |
||||||||
|
|
|||||||
uhm, from the very first initial post I understood that piping is not possible. phil, why are you and other guys confusing me! |
||||||||
|
|
|||||||
Dear, Great information, which can't be find on the FAQ forum now. Good suggestion to put it there too. A manual people aren't reading all the time. For newbies the amount of new information is too much. For oldies they think "the manual doesn't contain new information for me". greetings. (TIP_how_to_redirect_kix32_output) |
||||||||
|
|
|||||||
now, the documentation about this should also make clear that this only works with the old console version of kix. |