How To Find Commits With Code Containing a String

Author: , February 7th, 2020

How To Compare Two Lists Using grep

Author: , August 1st, 2016

Output all lines in list.txt which don’t match any line in excluded.txt: grep -Fxv -f excluded.txt list.txt

How To Match Multiple Spaces In VIM

Author: , July 22nd, 2011

I needed to take just the first occurrence of one or more spaces and turn that into a pipe symbol so as to create 2 fields for easy database import:

The important thing to note is the inclusion of the backslash in front of the plus (+) sign. That prevents an irritating session of […]

How To Filter Blank Lines With GREP

Author: , May 23rd, 2010

[code] # filter blank lines grep -hv "^$" * # filter blank lines and comments grep -hv ‘^#’ * | grep -hv "^$" # filter blank lines, and comments, then count number of lines grep -hv ‘^#’ * | grep -hv "^$" | wc -l [/code] Note – using FreeBSD’s version of grep. The “-h” […]