1. I/O Rediredtion under DOS and I think UNIX
- Posted by Mathew Hounsell <mat.hounsell at MAILEXCITE.COM> Mar 21, 1998
- 745 views
Can you redirect STDERR messages, ie messages that goto handle 2 in Euphoria eg puts(2, "Big Error") No!!!!! Why, because this is a fundemental part of DOS design. You don't want to miss an important error message do you? You may be able to redirect it, I'm not sure, by changing your settings by using CTTY. This is _not_ advised! You can however redirect STDOUT ie 1. I do it all the time, it helps tracing and is the quickest way to save dat a. ? the data while > or >> to a file. So use 1 to output unless it's real important. --- Sincerely, Mathew Hounsell Mat.Hounsell at mailexcite.com Free web-based email, Forever, From anywhere! http://www.mailexcite.com
2. Re: I/O Rediredtion under DOS and I think UNIX
- Posted by Daniel Berstein <danielberstein at USA.NET> Mar 22, 1998
- 722 views
- Last edited Mar 23, 1998
>You can however redirect STDOUT >ie 1. I do it all the time, it helps tracing and is the quickest way to save dat >a. >? the data while > or >> to a file. The other day I tried to make a small CGI with Euphoria (using OmniHTTP server for Windows 95). It failed. Why? Because I couldn't make the CGI return it's output to the browser (or server). Someone told me the trick was sending the output stream to STDOUT... but didn't work. Does anyone knows how a CGI sends output? Euphoria would be great fro CGI programming! From Rob's words: Euphoria is 40-60x faster than Python and/or Perl. Bye, Daniel Berstein.
3. Re: I/O Rediredtion under DOS and I think UNIX
- Posted by Irv Mullins <irv at ELLIJAY.COM> Mar 22, 1998
- 722 views
At 07:26 PM 3/22/98 -0400, Daniel Berstein wrote: >The other day I tried to make a small CGI with Euphoria (using OmniHTTP >server for Windows 95). It failed. Why? Because I couldn't make the CGI >return it's output to the browser (or server). Someone told me the trick was >sending the output stream to STDOUT... but didn't work. Does anyone knows >how a CGI sends output? > >Euphoria would be great fro CGI programming! It would. I think (from what I can find so far) that whereas Un*x STDIN and STDOUT are implemented as streams, DOS STDIN and STDOUT are devices. Take a look at WebReflex, a server that is set up to read and write dos files for it's CGI i/o. It is from Sapio Designs: http://www.sapio.co.uk/ maybe some of their help files will answer the question. Let me know if you get more info. I'd like to use Euphoria on my own server. Irv ------------------------------------------------------ Visit my Euphoria programming web site: http://www.mindspring.com/~mountains ------------------------------------------------------
4. Re: I/O Rediredtion under DOS and I think UNIX
- Posted by "Carl R. White" <C.R.White at SCM.BRAD.AC.UK> Mar 24, 1998
- 733 views
On Sun, 22 Mar 1998, Daniel Berstein wrote: > The other day I tried to make a small CGI with Euphoria (using OmniHTTP > server for Windows 95). It failed. Why? Because I couldn't make the CGI > return it's output to the browser (or server). Someone told me the trick was > sending the output stream to STDOUT... but didn't work. Does anyone knows > how a CGI sends output? You've got the essence there, you *do* need to send to STDout... Maybe your cgi just needs a little tweaking. ---- Here's a sample cgi (not in Euphoria though...): #!/bin/ksh -p # FingerMe.cgi from my webpage echo Content-type: text/plain echo "" finger crwhite at dcsun1.comp.brad.ac.uk ---- And another one: #!/bin/ksh # Beta directory reader echo Content-type: text/html echo echo "<HTML>" echo "<HEAD><TITLE>File lister test</TITLE></HEAD>" echo "<BODY>" echo "<H1>Directory of $1</H1>" echo "<PRE>" ### snip echo(es of) html stuff echo "</PRE><HR>" echo "<BR>" The point I'm trying to make here is the "Content-type:" and the blank lines have to be there. Without them the cgi doesn't work. HTH, Carl -- Carl R White - "Big brotherism: Doublethink so exist I (Descartes/CRW)" E-mail...: cyrek- at -bigfoot.com / Remove the hyphens before Finger...: crwhite- at -dcsun1.comp.brad.ac.uk \ mailing or fingering... Url......: http://www.bigfoot.com/~cyrek/