we want to mark with "#" the matched line by sed or perl line liner
for example
we want to mark all lines in file that include the DatePattern word
log4j.appender.DRFA.DatePattern=.yyyy-MM-dd
expected output
#log4j.appender.DRFA.DatePattern
note - in case line already marked then it will not add another "#" before the line