RE: stupid question



I think you were right, the popen function calls pipe so, it creates a pipe
somewhere in the hard drive,although it is not accesible by the file system
tree. 
> -----Mensaje original-----
> De: gtk-list-admin gnome org 
> [mailto:gtk-list-admin gnome org]En nombre
> de CAVEY GERARD
> Enviado el: miércoles 18 de septiembre de 2002 10:36
> Para: Seisdedos Nuñez, Monserrat; 'gtk-list gnome org'
> Asunto: RE: stupid question
> 
> 
> re
> i apologize i misunderstood ur answer
> idon t know why but i thought it created a file on hard drive..
> i m sorry :(
> in fact it s exactly what i need
> thanks
> 
> -----Message d'origine-----
> De : "Seisdedos Nuñez, Monserrat" [mailto:mseisdedos cirsa com]
> Envoyé : mercredi 18 septembre 2002 09:55
> À : 'CAVEY GERARD'; 'gtk-list gnome org'
> Objet : RE: stupid question
> 
> 
> 
> You can use the popen system call:
> FILE *shell_fd;
> char cabecera[80];
> 
> shell_fd = popen ("grep Page MyDoc|wc -l", "r");
> 
>   if ((shell_fd == (FILE *) NULL) || (shell_fd == (FILE *) - 1))
>     return;
> 
>   while (fgets (cabecera, 80, shell_fd) != NULL)
>     {
>        printf("%s\n",cabecera);
> 
>     }
> > -----Mensaje original-----
> > De: gtk-list-admin gnome org 
> > [mailto:gtk-list-admin gnome org]En nombre
> > de CAVEY GERARD
> > Enviado el: miércoles 18 de septiembre de 2002 9:54
> > Para: gtk-list gnome org
> > Asunto: stupid question
> > 
> > 
> > Hi,
> > this question is not gtk specific thus...
> > check that piece of code:
> > 
> > //i use the following to count the number of page in my doc
> > //thus how can i get the output of that command and store it 
> > in a variable?
> > 
> > system("grep Page MyDoc|wc -l")
> > 
> > 
> > hope someone can help :D
> > 
> > Greetings
> > 
> > 
> > _______________________________________________
> > gtk-list mailing list
> > gtk-list gnome org
> > http://mail.gnome.org/mailman/listinfo/gtk-list
> > 
> > 
> > **************************************************************
> > ***********
> > Ce message et toutes les pieces jointes (ci-apres le "message") sont
> > confidentiels et etablis a l'intention exclusive de ses 
> destinataires.
> > Toute utilisation ou diffusion non autorisee est interdite. 
> > Tout message electronique est susceptible d'alteration. 
> > SG Asset Management et ses filiales declinent toute 
> > responsabilite au titre
> > de ce message s'il a ete altere, deforme ou falsifie.
> > 
> > Découvrez l'offre et les services de SG Asset Management sur le site
> > www.sgam.fr 
> > 
> > 				********
> > 
> > This message and any attachments (the "message") are 
> confidential and
> > intended solely for the addressees.
> > Any unauthorised use or dissemination is prohibited. 
> > E-mails are susceptible to alteration.   
> > Neither SG Asset Management nor any of its subsidiaries or 
> > affiliates shall
> > be liable for the message if altered, changed or falsified. 
> > 
> > **************************************************************
> > ***********
> > 
> > 
> > 
> > _______________________________________________
> > gtk-list mailing list
> > gtk-list gnome org
> > http://mail.gnome.org/mailman/listinfo/gtk-list
> > 
> 
> 
> **************************************************************
> ***********
> Ce message et toutes les pieces jointes (ci-apres le "message") sont
> confidentiels et etablis a l'intention exclusive de ses destinataires.
> Toute utilisation ou diffusion non autorisee est interdite. 
> Tout message electronique est susceptible d'alteration. 
> SG Asset Management et ses filiales declinent toute 
> responsabilite au titre
> de ce message s'il a ete altere, deforme ou falsifie.
> 
> Découvrez l'offre et les services de SG Asset Management sur le site
> www.sgam.fr 
> 
> 				********
> 
> This message and any attachments (the "message") are confidential and
> intended solely for the addressees.
> Any unauthorised use or dissemination is prohibited. 
> E-mails are susceptible to alteration.   
> Neither SG Asset Management nor any of its subsidiaries or 
> affiliates shall
> be liable for the message if altered, changed or falsified. 
> 
> **************************************************************
> ***********
> 
> 
> 
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
> 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]