Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ames.UUCP Path: utzoo!watmath!clyde!cbosgd!cbdkc1!desoto!packard!edsel!bentley!hoxna!houxm!mtuxo!mtunh!mtung!mtunf!ariel!vax135!timeinc!phri!pesnta!amd!vecpyr!lll-crg!gymble!umcp-cs!seismo!hao!ames!amyjo From: amyjo@ames.UUCP (Amy Jo Bilson) Newsgroups: net.unix,net.unix-wizards Subject: redirecting stdin from within a program - HELP! Message-ID: <1025@ames.UUCP> Date: Wed, 26-Jun-85 16:30:03 EDT Article-I.D.: ames.1025 Posted: Wed Jun 26 16:30:03 1985 Date-Received: Tue, 2-Jul-85 05:23:04 EDT Distribution: net Organization: NASA-Ames Research Center, Mtn. View, CA Lines: 13 Xref: watmath net.unix:4927 net.unix-wizards:13691 Does anyone know of a way to read a file from stdin (using redirection or pipes) and then, when the input has been read (i.e. no more characters on input), to get some info from the keyboard? I assume that there is some mechanism to redirect the file descriptor for stdin from within a C program, but I haven't found it yet. If anyone knows how to do this, and could send me a code fragment illustrating the procedure, I'd be much obliged. Thanks in advance. Amy Jo Bilson ARPA: ames!amyjo@riacs UUCP: ames!amyjo