[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [shell-script] (OFF-TOPIC???) Saída de comando shell para programa e
From: |
Felipe Kellermann |
Subject: |
Re: [shell-script] (OFF-TOPIC???) Saída de comando shell para programa em C |
Date: |
Tue, 19 Apr 2005 11:19:45 -0300 (BRT) |
User-agent: |
Pine <http://www.washington.edu/pine/> |
On Mon, 18 Apr 2005 10:50am -0300, Mauricio Bonani wrote:
> Estou escrevendo um programa em C que executa o seguinte comando:
>
> system("cat ip.txt | wc -l");
>
> Como pegar a saída desse comando e jogar numa variável do C?
Use pipe(2).
--
Felipe Kellermann