Hm, durch Zufall habe ich es praktisch direkt nach Abschicken der Mail rausbekommen. In "test" sind 11 aufeinanderfolgende Zeilen "insert into Tabelle1 (values ...." und 10 solche für Tabelle2. linux:/tmp # grep -o -E "^[^(]*" test | uniq -c 11 insert into Tabelle1 10 insert into Tabelle2 Das stimmt. Also folgender Test: linux:/tmp # cat test >> test2 linux:/tmp # cat test >> test2 linux:/tmp # cat test >> test2 linux:/tmp # cat test >> test2 linux:/tmp # cat test >> test2 linux:/tmp # cat test >> test2 linux:/tmp # cat test >> test2 Und das Ganze von vorne linux:/tmp # grep -o -E "^[^(]*" test2 | uniq -c 11 insert into Tabelle1 10 insert into Tabelle2 11 insert into Tabelle1 10 insert into Tabelle2 11 insert into Tabelle1 10 insert into Tabelle2 11 insert into Tabelle1 10 insert into Tabelle2 11 insert into Tabelle1 10 insert into Tabelle2 11 insert into Tabelle1 10 insert into Tabelle2 11 insert into Tabelle1 10 insert into Tabelle2 Hm, vielleicht vorher sortieren? linux:/tmp # grep -o -E "^[^(]*" test2 |sort|uniq -c 77 insert into Tabelle1 70 insert into Tabelle2 Und siehe da: linux:/tmp # grep -o -E "^[^(]*" statements|sort|uniq -c|sort -n|uniq|tail -n 2 4992 insert into Tabelle1 28800 insert into Tabelle2 Technik, die begeistert :) Dominik ~