awk statement to match all lines starting with "#"

Looking for awk statement that will match all lines starting with "# "

if ( $1 == \^"#" )

Input file:

# of the server. If you would like to set these, please take out the
# pound (#) sign in front of one or all severities and set it equal to
# severity desired. For example, FATAL=3
#
#FATAL=2
#CRITICAL=3
#WARNING=4

Hi.

awk '/^#/ { .... }' file

To use regular expression matches in, for example, and if-statement, use ~ instead of ==

if ( $1 ~ /^#/ ) ...

Grep is simpler if you don't want to do anything with what you find:

grep ^# input_file

scottn, works like a charm, thank you very much. That put the finishing touch to my awk script.

{
if (sub(/DISCOVERY=ON/, "DISCOVERY=OFF"))
print $0
if ( $1 ~ /^#/ ) {
        print $0 }
if ( NF == 4 ){
    if ( system("test -d " $4) ) {
         }
    else {
        print "1        0       0       "$4 "\n" }
}
}