in reply to How do I strip lines prefixed by a "#"

you can use the bash grep running externally grep -v '^#' file

Replies are listed 'Best First'.
Re: Answer: How do I strip lines prefixed by a
by Anonymous Monk on Feb 28, 2003 at 06:36 UTC
    Administrator@C ~
    $ cat t
    one
    #two
    #three
    four
    #five
    six
    
    Administrator@C ~
    $ perl -ne 'print if not m/^#.*/' <t
    one
    four
    six
    
    (or in K:
    x@&~"#"=*:'x
    )