Remove comments and blank lines from a file Posted on 9. February 20079. November 2007 by Hans-Henry Jakobsen sed -i '/.*#/d;/^*$/d' filnavn Share this:FacebookX