Wednesday, July 29, 2015

How to show only settings and not the comments in a file

In Bash , ZSH or most shells. Comments are added in files using #   or sometinmes ;

Sometimes files are full of comments and finding the settings that are set amongst all the comments can be confusing.

The following will show you the contents of a file excluding lines begining with #

substitute the #   with a ;  if your program uses ;  to comment

grep -v '^#'  filename

No comments: