Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!sdd.hp.com!decwrl!shelby!portia.stanford.edu!mpyoung From: mpyoung@portia.Stanford.EDU (M. Pinghua Young) Newsgroups: comp.unix.questions Subject: How does a C program know its input is being redirected? Keywords: input, stdin, redirect, pipe, C program Message-ID: <1990Aug16.050013.21280@portia.Stanford.EDU> Date: 16 Aug 90 05:00:13 GMT Sender: mpyoung@portia.Stanford.EDU (M. Pinghua Young) Distribution: usa Organization: Graduate School of Business, Stanford University Lines: 10 I am writing a program that prompts users for various inputs. However, the user can also put the input in a file and pipe it to my program, or use input redirection "<". In this case I don't want the program to prompt anything. Can anyone tell me how to achieve that? Please send me e-mails. Thank! -- | M. Pinghua Young | Confucius Said: | | pinghua@suwatson.bitnet | "Life Begins at 30" | | mpyoung@portia.stanford.edu | But He Died At 29. |