[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

A question.



Hello,

I have a small problem - may be a silly one.. :-(

I want to execute unix commands on a remote server, and print the output
of the command on the client.  But, my problem is how to capture the
output of the command.  

If I say system ("pwd"), a child will be created, the command will be
executed, print on std output and then the child dies.  

I don't want to redirect the output to a file (system ("pwd > myfile");) 
as it is very expensive to create the file, read from it and then delete
it.

Is there a better way of doing it?

Thanks,
Srinath.