Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!apple!agate!pasteur!laertes.berkeley.edu!c164-bj From: c164-bj@laertes.berkeley.edu (Derc Yamasaki) Newsgroups: comp.binaries.ibm.pc.d Subject: Determining if there's redirection on the command line... Keywords: redirect stdout stderr Message-ID: <12353@pasteur.Berkeley.EDU> Date: 27 Mar 91 21:10:26 GMT Sender: news@pasteur.Berkeley.EDU Reply-To: c164-bj@laertes.berkeley.edu (Derc Yamasaki) Distribution: na Organization: University of California, Berkeley Lines: 13 What's the preferred method of determining within a C program whether a user has redirected stdout or stdin on the command line? Interrogating an 'fstat' structure's file mode works on my PC, but there must be a more elegant, portable way of doing this, right? Also, how can one redirect stderr to a file from a (DOS) command line? Any help from you wizards would be greatly appreciated! Derc (new subscriber, hoping his first inquiry is received favorably)