🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: ch.comp.os.linux
2 messages
2 total messages Started by Andre Dietisheim Thu, 18 Mar 1999 00:00
SED: s/<regexp>/<substitution>/
#23797
Author: Andre Dietisheim
Date: Thu, 18 Mar 1999 00:00
11 lines
884 bytes
Hallo!

Ich habe versucht per sed-skript die Konfig-Date named.conf zu
modifizieren.
Nun besteht aber das Problem, dass eine
sed-Substitution(s/<regexp>/<substitution>/ in der <substitution>
scheinbar keinerlei spezieller Characters (bsp. \<newline> oder \n
schluckt. Wie kann man denn so eine v�llig neue Zeile in eine
Konfigurationsdatei einf�gen???

Bin f�r jeden Tip dankbar...
Re: SED: s/<regexp>/<substitution>/
#23668
Author: Dominik Fretz
Date: Thu, 18 Mar 1999 00:00
40 lines
1726 bytes
Andre Dietisheim wrote:
> 
> Hallo!
> 
> Ich habe versucht per sed-skript die Konfig-Date named.conf zu
> modifizieren.
> Nun besteht aber das Problem, dass eine
> sed-Substitution(s/<regexp>/<substitution>/ in der <substitution>
> scheinbar keinerlei spezieller Characters (bsp. \<newline> oder \n
> schluckt. Wie kann man denn so eine v�llig neue Zeile in eine
> Konfigurationsdatei einf�gen???
> 
> Bin f�r jeden Tip dankbar...

hi

ich kenn zwar sed nicht, aber ich w�rde perl verwenden. die syntax ist
fast identisch aber es ist m�chtiger.

in perl kannst du z.b das machen.

open(MAIN, ">>./blabla.test");
print MAIN"\ndas ist ein test";
close(MAIN); 

und wenn dus unbedingt in nem bash script verwenden willst, kannst dus
so machen:
perl -e 'open(MAIN, ">>./bla.test"); print MAIN "\ndas ist ein test";
close(MAIN);'

das f�gt am schluss der datei etwas an.


gruss DOminik



-- 
No one can guarantee the actions of another.
		-- Spock, "Day of the Dove", stardate unknown
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads