[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: eine Zeile in Datei einfügen



* Michael Renner <michael.renner@gmx.de> [28.09.2008 17:05]:
> Urzustand der Datei:
> ----------cut----------
> Section "1"
> 	foo
> 	bar
> EndSection
> 
> Section "2"
> 	foo
> 	bar
> EndSection
> 
> Section "3"
> 	foo
> 	bar
> EndSection
> ----------cut----------
> 

Folgendes fügt eine Zeile unterhalb Section"2" ein, ausgerichtet mit
einem Tabulator.

perl -pe 's/Section "2"/$_\twert/;' testdatei

-- 
stefan.bauer@cubewerk.de		Cubewerk
Tel   +49 8621 996 02 37		IT-Beratung + Planung
Tel   +49  179 119 47 67		Verkauf von Hard und Software
Fax   +49 1212 511057903		Herzog-Otto-Straße 32
http://www.cubewerk.de			83308 Trostberg


Reply to: