[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
 

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



On Tue, 7 Mar 2000 22:37:10 +0100, Danni Finne <sslug@sslug> wrote:
> Tak for dit svar... Jeg går ud fra at denne metode er hurtigere end Thomas
> Rasmussens eksempel ? Ellers kan jeg ikke rigtig se nogle fordele i at gøre
> det på denne måde i forhold til det andre eksempel....

Der er nu også andre fordele. Først og fremmest skal du ikke finde et filnavn
og sikre dig mod at der er andre der har oprettet filen først og at der ikke er
et symbolsk link med det navn du vælger etc. Faktisk svarer den pipe jeg har
lavet til at du eksekverer: ls | ./myProgram og lader myProgram læse fra
STDIN. myProgram kan derudover begynde at læse og lave hvad der nu skal laves
før ls er færdig. med system("ls > file"), skal du vente på at ls bliver færdig
før du kan læse filen.

-- 
Most kind regards,
Kristian Bjoernskov, <mailto:sslug@sslug>
Novo Nordisk IT, Network - internet.
Phone: +45 4442 3299. Fax: +45 4442 6061


 
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] *