Grep: Difference between revisions
From Federal Burro of Information
Jump to navigationJump to search
No edit summary |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
<pre>cat /srv/gitblit-1.4.1/data/gitblit.properties | egrep -v '^\s?#' | grep -v "^[[:space:]]*$"</pre> | <pre>cat /srv/gitblit-1.4.1/data/gitblit.properties | egrep -v '^\s?#' | grep -v "^[[:space:]]*$"</pre> | ||
drop in replacement for grep: sift, lone binary https://sift-tool.org/download | |||
grep comment | |||
egrep -v '^\s?#' | |||
or possibly: | |||
egrep -v '^\s+#' |
Latest revision as of 18:36, 31 July 2019
get rid of comments, even lines that start with space and then have comments:
more /etc/apache2/vhosts.d/default_vhost.include | egrep -v '^\s?#'
remove comments , and blanks lines:
cat /srv/gitblit-1.4.1/data/gitblit.properties | egrep -v '^\s?#' | grep -v "^[[:space:]]*$"
drop in replacement for grep: sift, lone binary https://sift-tool.org/download
grep comment
egrep -v '^\s?#'
or possibly:
egrep -v '^\s+#'