31 Jul
2003
31 Jul
'03
10:07
On Thu, 2003-07-31 at 13:43, SuSE wrote:
Bernd Tannenbaum wrote:
Vielleicht hat auch einfach einer ne URL von einer brauchbaren Beispielseite. Beispiele wie "$a\ Fügt text an letzte Zeile an .....blablablub" nützen halt überhaupt nix, wenn man den Befehl in seiner kompletten syntax nicht hinbekommt.
Weiss im Moment auch nix
Beispiel: Testdatensatz: # cat test.txt a b c e hugo f g h i # sed -e '/ hugo /a\hallo\ welt' test.txt a b c e hugo f hallo welt g h i Achtung: Die sed Zeile besteht aus einer Zeile, die über 2 Zeilen umgebrochen ist (Also: <Backslash>hallo<Backslash><\n>welt) Etwas übersichtlicher wird das Ganze als sed-Script: # cat script.sed / hugo /a\hallo\ welt # sed -f script.sed test.txt ... Ralf