Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Newbie question: printing to the STDOUT with VIEW

 [1/8] from: jorgie:missouri at: 16-Mar-2004 10:33


I can't find this answer anywhere... I have rebol/view installed but I have scripts that need to print to the command line. How do I get a script to send its output back to the dos window it was called from? I assume I don't need to have both rebol/core and rebol/view. Jorgie -- Erik Jorgensen System Administrator IATS: Combined Server Group University of Missouri - Columbia [jorgie--missouri--edu] 573.882.5974 Enjoy Every Sandwich - Warren Zevon, RIP 09/07/03

 [2/8] from: greggirwin:mindspring at: 16-Mar-2004 11:39


Hi Erik, JEI> How do I get a script to send its output back to the dos window it was JEI> called from? You need to use the CGI switch (-c) to tell REBOL to redirect its output that way. -- Gregg

 [3/8] from: tomc:darkwing:uoregon at: 16-Mar-2004 11:23


hmmm I belive that works everywhere _but_ windows, the lack of response from C:\rebol\view>rebol -c --do"print {foo}" seems to confirm it, I have a vague recollection of someone on the list wrapping their scrip in a .bat, writing the data to disk and then printing the output by reading the file from the .bat to get around it but hopefully someone will come up with something more graceful. On Tue, 16 Mar 2004, Gregg Irwin wrote:

 [4/8] from: greggirwin:mindspring at: 16-Mar-2004 13:11


Hi Tom, TC> I belive that works everywhere _but_ windows, TC> the lack of response from C:\rebol\view>>rebol -c --do"print {foo}" TC> seems to confirm it, Right, you'd have to pipe it somewhere in the DOS window. e.g. C:\rebol\view\rebol -c --do "print {foo} quit" | more -- Gregg

 [5/8] from: Greg::Brondo::allegiancetelecom::com at: 16-Mar-2004 14:08


the -c doesn't work in windows...I seem to recall some way of perfoming a write-io for this purpose?

 [6/8] from: maximo:meteorstudios at: 16-Mar-2004 15:20


> hmmm > > I belive that works everywhere _but_ windows, > the lack of response from > > C:\rebol\view>rebol -c --do"print {foo}" > > seems to confirm it,
actually, the problem in this example might be that the --do argument is broken (ignored) in several versions of rebol... (this might also be the case on specific OSes only.) you can run a script tough and use MORE to print it to the console like so: C:\rebol\view>rebol -c --script test.r | MORE the problem with more on windows is that there in no switch to turn off one screen at a time viewing with user pressing return... if your output is longer than one page, or is part of a live server, then you will have to find a better more.exe I am SURE there are many on the net, or you can run the script and get print its log once the app has quit. call "view1210031 -c --script test.r > log.txt" & type log.txt we need to call view because the nutty DOS shell does not close the log.txt file handle befor the end of the line, which means, type will try to print an empty file.... yes... the DOS Shell IS BAD :-( -MAx

 [7/8] from: tomc:darkwing:uoregon at: 16-Mar-2004 12:21


thanks, that I will have to remember. On Tue, 16 Mar 2004, Gregg Irwin wrote:

 [8/8] from: jorgie:missouri at: 16-Mar-2004 20:11


Wow! Thanks to everyone who responded!!! I think I am going to like this list! ________________________________ From: [rebol-bounce--rebol--com] on behalf of Tom Conlin Sent: Tue 3/16/2004 2:21 PM To: Tom Conlin Subject: [REBOL] Re: Newbie question: printing to the STDOUT with VIEW thanks, that I will have to remember. On Tue, 16 Mar 2004, Gregg Irwin wrote:
> Hi Tom, > TC> I belive that works everywhere _but_ windows,
<<quoted lines omitted: 7>>
> To unsubscribe from this list, just send an email to > [rebol-request--rebol--com] with unsubscribe as the subject.
-- To unsubscribe from this list, just send an email to [rebol-request--rebol--com] with unsubscribe as the subject. -- Binary/unsupported file stripped by Ecartis -- -- Type: application/ms-tnef -- File: winmail.dat

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted