[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Sv: [CPROG] Eksekvere kommando og læse output



Løsningsforslag:
Følgende afvikler ls og sender output til en fil. Så kan du herefter aflæse/parse output derfra.

#include <stdlib>
void main()
{    system("ls > /tmp/output.txt"); }

MVH Thomas

----- Original Message ----- 
From: Danni Finne <sslug@sslug>
Newsgroups: sslug.cprog
To: <sslug@sslug>
Sent: Monday, March 06, 2000 4:28 PM
Subject: [CPROG] Eksekvere kommando og læse output


> Ja, det er mig igen :)
> 
> Kan I give et lille eksempel på hvordan jeg laver et c program der
> eksekverer f.eks. ls og læser i outputtet fra ls ?
> 
> Eller kræver det en længere doktorafhandling ?
> 
> --
> MVH
> Danni Finne
> 
> 
> 
> 



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *