Kommentare aus Config-Files entfernen

Manchmal sind Kommentare in Config Files seehr nervend. Folgender Einzeiler schafft dem Abhilfe:

#!/bin/bash
# Code to cat a config file removing all comments and blank lines.
grep -vh '^\(#\|$\)' $1

Gefunden auf: http://forums.gentoo.org/viewtopic-t-160179.html

blog comments powered by Disqus