Hallo, Am Sun, 10 Apr 2005, Thomas Rippler schrieb:
sed '/=/d'
Loescht alle Zeilen in denen ein '=' vorkommt.
so, das habe ich jetzt geschafft. Doch trotz einer ausführlichen Erklärung (Linux Profitools, Add.Wesley) bekomme ich es nicht hin, das diese Bedingung von eben negiert wird. Ich möchte jetzt also alle Zeile löschen, die einen bestimmtem Buchstaben NICHT enthalten. Ich bekomme maximal hin, dass meine Befehle auf den ersten Buchstaben der Zeile Auswirkungen haben.
?
Die Krönung wäre noch eine ODER-Bedingung nach dem Muster. Lösche die Zeile falls kein "e" oder "E" enthalten ist.
sed '/[eE]/!d' Oder: sed -n '/[eE]/p' ==== man sed ==== After the address (or address-range), and before the com mand, a ! may be inserted, which specifies that the com mand shall only be executed if the address (or address- range) does not match. ====
Geht das mit sed überhaupt oder muß ich mich jetzt in awk einarbeiten?
Aber klar geht das ;) --
We're already nostalgic about The Week You Got Your Eyes Fixed. "Well, not really so much that week as what followed, The Month Matt Discovered Girls. *Big* chunk of delayed puberty he went through there, as soon as he could see what they look like." - Peter da Silva and adb [stolen from Matt's sig]