Suchen und Ersetzen in Text-Dateien

Florian Lohoff flo at rfc822.org
Tue Dec 4 11:58:02 CET 2001


On Tue, Dec 04, 2001 at 11:41:50AM +0100, Matthias Vennekötter wrote:
> Hallo,
> 
> ich möchte in Config-Files einige Eintraege aendern. Zu diesem Zweck suche
> ich eine Moeglichkeit, mit awk, sed oder einem anderen Tool eine Suche und
> Ersetze Funktion ueber ein Bash-Skript zu steuern.
> Leider habe ich bislang nicht wirklich aussagefaehige Beispiele im Netz
> gefunden. 
> 
> Ich hoffe, daß mir jemand weiterhelfen kann.

cat file | sed -e 's/foo/bar/' >file.new

Und jetzt regex lernen und gluecklich sein ...

Flo
-- 
Florian Lohoff                  flo at rfc822.org             +49-5201-669912
Nine nineth on september the 9th              Welcome to the new billenium
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://lug-owl.de/pipermail/linux/attachments/20011204/350b15b7/attachment.sig>


More information about the Linux mailing list