shell-script-pt
[Top][All Lists]
Advanced

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

Re: [shell-script] pipes?


From: Fabiano Caixeta Duarte
Subject: Re: [shell-script] pipes?
Date: Mon, 03 Oct 2005 23:55:20 -0300
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050317)

Use o parâmetro --line-buffered no grep

O manual cita '--line-buffering'. Está errado! Isto inclusive já foi reportado aos mantenedores :)

Consultando grep --help você poderá ver a sintaxe correta.

Isto promove algo como a chamada à função fflush da stdio.h (em C).

É isto!

Fabiano Caixeta Duarte
Consultor em soluções para Redes de Computadores
Ribeirão Preto - SP

murgent_shell escreveu:
Pessoal

Tenho o seguinte script

-----------------------
#!/bin/bash logFile="log2.log"
tail -f $logFile | grep x.y.z:105" | cut -f1,2,6,12
-d" "
-----------------------

não funciona, mas se eu retirar o tail -f $logFile
tudo funciona normalmente, mas preciso monitorar on
line o arquivo. Alguma idéia?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]