Am Dienstag, 24. Juni 2003 19:40 schrieb David Haller:
Hallo,
On Tue, 24 Jun 2003, Al Bogner schrieb:
Welche Möglichkeiten gibt es Kommentare (#) von Dateien nicht anzuzeigen? Kann man das mit grep filtern? Gibt es eventuell auch mit vi eine Möglichkeit beim Editieren?
==== ~/bin/delcomments ==== #!/usr/bin/sed -f s/^[ \t]*#.*// /^[ \t]*$/d ====
-dnh
-- The speed at which a mistyped command executes is directly proportional to the amount of damage done. -- Joe Zeff
Hallo David, koenntest Du bitte ein par Saetze zu diesem sed konstrukt schreiben, ich blick nicht ganz wie es funktioniert (aber es tut ;-) Annsonsten haette ich noch einen vorschlag: egrep '^#|^$' /foo/bar >> /bar/foo regards Martin -- ________________________________creating IT solutions Martin Schmiderer science + computing ag System Administration Hagellocher Weg 71-75 phone +49 7071 9457 225 72070 Tuebingen, Germany fax +49 7071 9457 211 www.science-computing.de