Servus David, sorry, ich kapier gar nix, und hake nochmal nach: David Haller, Mittwoch 15 September 2010: 1 find . -type f -exec gawk ' 2 function endfile() { 3 if( words[1] && words[2] && words[3] ) { 4 print lastfile; 5 } 6 } 7 lastfile != FILENAME { 8 endfile(); 9 words[1] = 0; words[2] = 0; words[3] = 0; 10 lastfile = FILENAME; 11 } 12 /wort1/ { words[1]=1; } 13 /wort2/ { words[2]=1; } 14 /wort3/ { words[3]=1; } 15 END { endfile(); } 16 ' '{}' + In Zeile 10 wird lastfile = FILENAME gesetzt, und erst dann ist Zeile 7 erfüllt. Wie kann es dazu kommen, daß Zeile 7 erfüllt ist, ohne daß Zeile 10 vorher durchlaufen wurde? Ich sehe, daß Dein Skript funktioniert. Folgendes Skript funktioniert aber auch: find ~/Mail -type f -exec gawk ' /wort1/ { words[1]=1; } /wort2/ { words[2]=1; } /wort3/ { words[3]=1; } END { if ( words[1] && words[2] && words[3] ) { print FILENAME; } }' '{}' ; Das ist viel einfacher als Deines, auch wenn Deines etwas schneller ist: Deines braucht 3:59, um meinen Mailspool umzugraben, meines 4:35. Danke+Gruß! -- Andre Tann -- Um die Liste abzubestellen, schicken Sie eine Mail an: opensuse-de+unsubscribe@opensuse.org Um eine Liste aller verfuegbaren Kommandos zu bekommen, schicken Sie eine Mail an: opensuse-de+help@opensuse.org