grep.c basic functionality