Re: environnement et C

Top Page

Reply to this message
Author: Eric Fanchon
Date:  
To: guilde
Subject: Re: environnement et C
Frederic Mantegazza wrote:
>


>
> Dans le meme ordre d'idee, comment peut-on recuperer le resultat d'une
> commande shell dans un programme en C (mise a part de passer par un
> fichier) ?
>
> --


faire man popen

c'est du style :

char *command_string;
output = popen (command_string, "r");

while ( fgets (buffer, BUFLEN, output) != NULL )
{ ............


Eric

----------

Ceci est le 2eme essai, le 1er n'etant apparemment pas passe.
notification d'erreur :

----- The following addresses had permanent fatal errors -----
genelist@???

----- Transcript of session follows -----
... while talking to beta.dmz-eu.st.com:
>>> RCPT To:<genelist@???>

<<< 554 <genelist@???>: Recipient address rejected: Access denied
554 genelist@???... Service unavailable

??????????????

--

+------------------------------+----------------------------------------+
|  email: Eric.Fanchon@???  |  IBS Institut de Biologie Structurale  |
|   Tel:  (33) 4 76 88 95 91   |         41, rue Jules Horowitz         |
|   Fax:  (33) 4 76 88 54 94   |     38027 GRENOBLE Cedex 1  France     |

+------------------------------+----------------------------------------+