User Tools

Site Tools


bash:files:display_uncommented_lines_of_a_file

BASH - Files - Display uncommented lines of a file

To list only the uncommented lines of a file:

grep -v ^# file.conf | grep -v ^$

where:

  • “grep -v ^#“ means list out everything that do not start with #.
  • “grep -v ^$” means list out everything that do not start with blank space.
bash/files/display_uncommented_lines_of_a_file.txt · Last modified: 2022/06/13 11:14 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki