sed -i '19375 s/^/#/' file where 19374 - line number. perl -pi -e 's/(.*MATCH.*)/#$1/' file where MATCH - string or part of string, which you would like to comment
If you took error:
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = «ru_RU.UTF-8»
are supported and installed on your system.
perl: warning: Falling back to the standard locale («C»).
perl: warning: Setting locale failed.
You should make follow command to setup UTF8 american locale.