Saturday, February 19, 2022

Print Everything But Comments and Empty Lines

Here's a simple way to display every line except for comments and blank lines from a file like /etc/ssh/sshd_config:

Code


grep -v '^#' /etc/ssh/sshd_config | grep -v '^$'
    



This work is licensed under the Creative Commons Attribution 3.0 Unported License.

4 comments:

  1. I would like to thank you for the efforts you have made in writing this article.
    Best Application Development Company

    ReplyDelete
  2. Ghost Writing usually take back the credit from the real author. But he or she should be encouraged.

    ReplyDelete
  3. I acknowledge the point that you want to highlight and think it should be important among the audience. Actually our principal purpose should be to give high-quality content to our blog or web visitors.

    ReplyDelete