Jan Trippler wrote:
...
Alle anderen Loesungen sind komplizierter:
Nana. Das ist jetzt ein wenig absolut:
grep -v "^#" infile | while read zeile; do
entspricht ed /^#/d
awk ' /^ / { next } /^#/ { next } { print $0 } ' infile | while read zeile; do
entspricht ed '/^[ #]/d'
Kommentare in der Zeile kann man auch sehr einfach entfernen: grep ... | cut -f1 -d"#" | while read zeile; do ...
entspricht ed "/^#/d;s/#.*//" ... Soviel zu 'Einfach' (oder kurzoder elegant) Henning -- H. Henning Vossieck http://hhv.de [currently inactive] SuSE Linux 6.4 Kernel 2.4.0-test4-pre4-277 glibc 2.1.3 gcc 2.95.2 --------------------------------------------------------------------- To unsubscribe, e-mail: suse-linux-unsubscribe@suse.com For additional commands, e-mail: suse-linux-help@suse.com