minix/commands/grep
Ben Gras e92490cf47 ld.elf_so, grep, make: use mmap()
. let the dynamic linker use a real file mmap(), reverting
	  most of the minix-specific changes
	. except for a fallback mode for systems or filesystems that
	  do not support mmap() on files
	. make, grep: let them use mmap() too, with fallback

Change-Id: I11c0c9ad439d713917a6f5c2d196558f6c03eabd
2013-05-31 15:42:01 +00:00
..
binary.c grep: unsigned chars to fix gcc warnings. 2010-06-20 12:31:55 +00:00
file.c ld.elf_so, grep, make: use mmap() 2013-05-31 15:42:01 +00:00
grep.1 More cleaning up 2012-02-15 19:04:58 +00:00
grep.c More cleaning up 2012-02-15 19:04:58 +00:00
grep.h grep: unsigned chars to fix gcc warnings. 2010-06-20 12:31:55 +00:00
Makefile Full switch to clang/ELF. Drop ack. Simplify. 2012-02-14 14:52:02 +01:00
mmfile.c ld.elf_so, grep, make: use mmap() 2013-05-31 15:42:01 +00:00
queue.c original openbsd grep (freegrep) 2010-06-20 11:54:40 +00:00
readme.md original openbsd grep (freegrep) 2010-06-20 11:54:40 +00:00
util.c grep - letting calloc() return NULL for 0 storage makes grep "" work 2011-02-20 13:34:53 +00:00

FreeGrep

The grep utility searches any given input files, selecting lines that match one or more patterns. By default, a pattern matches an input line if the regular expression in the pattern matches the input line without its trailing newline. An empty expression matches every line. Each input line that matches at least one of the patterns is written to the standard output. grep is used for simple patterns and basic regular expressions; egrep can handle extended regular expressions. fgrep is quicker than both grep and egrep, but can only handle fixed patterns (i.e. it does not interpret regular expressions). Patterns may consist of one or more lines, allowing any of the pattern lines to match a portion of the input. zgrep, zegrep, and zfgrep act like grep, egrep, and fgrep, respectively, but accept input files compressed with the compress or gzip compression utilities.