Skip to content

Instantly share code, notes, and snippets.

@takenoko-str
Last active January 24, 2017 04:39
Show Gist options
  • Save takenoko-str/9685c5f9121935d4d74b1da7c95aac19 to your computer and use it in GitHub Desktop.
Save takenoko-str/9685c5f9121935d4d74b1da7c95aac19 to your computer and use it in GitHub Desktop.
this is a part of useful operation grep.
# Case 1.
# You can use sgrep to escape # comment out or blank lines
alias sgrep='egrep -v "^\s*(#|$)" --color=auto'
# Case 2.
# You can use cgrep to separate from pure comment and default option.
# For basically default options, there is no white spaces between # and the sentence.
# ex) in my opinion
# This is a pure comment blablabla
#this_is=default_option
# When you installed a middleware, .conf files were always written like that
alias cgrep='egrep -v "^\s*(#$|#\s|$)" --color=auto'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment