sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

commit 0d955d3f23f322d3b2b2ffda8287f548f88c3e19
parent 0e9eee4fa329f5c909f5f21abd01e8019d552213
Author: sin <sin@2f30.org>
Date:   Wed, 20 Jan 2016 17:26:47 +0000

grep: Change match any pattern to "^"

Diffstat:
Mgrep.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/grep.c b/grep.c @@ -50,7 +50,7 @@ addpattern(const char *pattern, size_t patlen) /* a null BRE/ERE matches every line */ if (!Fflag) if (pattern[0] == '\0') - pattern = "."; + pattern = "^"; if (!Fflag && xflag) { tmp = enmalloc(Error, patlen + 3);