home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!usc!sol.ctr.columbia.edu!ira.uka.de!chx400!bernina!wild
- From: wild@nessie.cs.id.ethz.ch (Markus Wild)
- Subject: Re: Console file handlers from within a Shell started program
- Message-ID: <1992Aug20.152717.11514@bernina.ethz.ch>
- Sender: news@bernina.ethz.ch (USENET News System)
- Organization: Swiss Federal Institute of Technology (ETH), Zurich, CH
- References: <14545@borg.cs.unc.edu> <1b854d0d.ARN237c@prolix.pub.uu.oz.au> <14605@borg.cs.unc.edu>
- Date: Thu, 20 Aug 1992 15:27:17 GMT
- Lines: 39
-
- In article <14605@borg.cs.unc.edu> tell@rukbat.cs.unc.edu (Stephen Tell) writes:
- >In article <1b854d0d.ARN237c@prolix.pub.uu.oz.au> munnari!labtam!eyrie!prolix!dac writes:
- >>In article <14545@borg.cs.unc.edu>, I wrote:
- >
- >>> Last time I checked (1.3) AmigaDOS didn't have standard error. The C runtime
- >>> environments for Manx, Lattice/Sas, et. al. opened the console to simulate
- >>> it.
- >
- >>It works for me
- >> fprintf(stderr,WELCOME"\n%s",ctime(×tart));
- >>writes to stderr, and
- >> printf("Particulars is %s\n",particulars);
- >>writes to stdout.
- >
- >>If I redirect stdout via '>', then I get the stderr output on the
- >>console, and not in the redirected output.
- >
- >>Where is the problem?
- >> David Andrew Clayton. dac@prolix.pub.uu.oz.au
- >
- >Now, show me how to put stderr in a file and let stdout go to the console...
- >and how to put stderr in one file and stdout in another. Can't be done, to
- >my knowledge.
-
- It's possible with my pdksh port, just do
- your_program > stdout_file 2> stderr_file
-
- or for both into one file
- your_program > both_file 2>&1
-
- Should work for both ixemul and plain programs. For the latter, it will only
- work if those processes use the REAL stderr new with OS2.0, not when they
- dup the console with "*".
-
- -Markus
- --
- Markus M. Wild - wild@nessie.cs.id.ethz.ch | wild@amiga.physik.unizh.ch
- Vital papers will demonstrate their vitality by spontaneously moving
- from where you left them to where you can't find them.
-