Agnus Dei (jackal) wrote,
Agnus Dei
jackal

How to comment out a single line in a file using sed:

How to comment out a single line that matches a string using sed:

sed -i '/ActionFileDefaultTemplate/  s/^/#/g' /etc/rsyslog.conf
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 0 comments