[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::digital_unix

Title:DIGITAL UNIX(FORMERLY KNOWN AS DEC OSF/1)
Notice:Welcome to the Digital UNIX Conference
Moderator:SMURF::DENHAM
Created:Thu Mar 16 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:10068
Total number of notes:35879

9167.0. "piping in values to a c program" by WRLDYD::BOURQUE () Thu Mar 13 1997 13:14

Hello,

    I am running a c program from a korn shell script and want the
    c program to accept input from the next couple of lines in the
    script.

    Here is the example

    program.c << end
    answer1
    answer2
    ...
    end
    then continue with script.

    The type of logic works fine for korn shell commands and sql commands.
    But I am not having any luck using this logic with a c program.

    The C program prompts for the first answer and just sits there.

    I run the script as follows.

    sript a.ksh > a.log

    when I run the script, the c program eventually times out and exits.

    Any suggestions would be helpfull.

Thanks

Ray Bourque
T.RTitleUserPersonal
Name
DateLines
9167.1okay, I'll biteNETRIX::&quot;[email protected]&quot;Farrell WoodsMon Mar 17 1997 10:107
Is your C program doing anything strange with stdin?  Does it do what
you expect if you type the answers at it?


	-- Farrell

[Posted by WWW Notes gateway]