Schwanz hat folgende Möglichkeiten:Schwanz -f + Grep?
-f The -f option causes tail to not stop when end of file is reached, but rather to wait for additional data to be appended to the
input. The -f option is ignored if the standard input is a pipe, but not if it is a FIFO.
ich nur für something
im Heck Ausgabe möchte grep.
tail -f <FILE> | grep <SOMETHING>
Problem ist es nur laufen grep einmal und fertig ist. Keine andere Ausgabe geschieht. Wie kann ich Grep korrekt mit dem -f
laufen lassen?
Ich mache oft genau das, was Sie beschreiben, und es funktioniert. Der 'grep'-Befehl wird nicht beendet, bis der' tail -f'-Prozess endet, aber natürlich erzeugt er keine Ausgabe, bis etwas, das das Muster enthält, an die Datei angehängt wird. –
Ich kann das gleiche auf mehreren Plattformen bestätigen. Ich hatte nie Probleme mit Tail + Grep genau wie hier beschrieben. Auf welcher Plattform hast du Probleme? –
'Problem ist es nur einmal laufen grep und ist fertig' Nein, das ist nicht richtig. – anubhava