invoking an Unix script from a C Program

How to invoke an Unix Script from C program?

(or)

How to invoke another C program from a C program?

thanks
Karthik

you can use system() or exec/spawn function families. check out the man pages for their details.

You can also call popen() / pclose() if you want to be able to have continuing input or get feedback.

Thanks a lot to repliers.

Karthik

hi
i would like to know ,how i can can read from a file bu using a script
and genrating the content of the file

thanks

#/bin/ksh
while read record
do
    echo "$record"
done < /path/to/inputfile