unix & C doubts

Hi,

I have a few doubt here :

1) I want to run a 3 different 'C' programs in same session simulteneously (parelelly). if I make a shell, it is running one after another, I mean it shout run in 3 processors.

2) In 'C' program, how can I assing a value of the unix commant
cat a.txt|wc -l into a c pgrogram variable cnt.

Kindly give the solution to :kkodava@maxis.com.my

Thanks

Krishna

1) You put an ampersand & at the end of the line in your shell script to background the program. You can get all three running at once this way.

2) Use popen() to get a charater string with the answer. Then use sscanf() to convert that string to an integer.