handle --

This commit is contained in:
Connor Lane Smith
2011-05-24 11:05:36 +01:00
parent 8c76381e91
commit 4c6c379812
3 changed files with 13 additions and 9 deletions

2
grep.c
View File

@@ -36,7 +36,7 @@ main(int argc, char *argv[])
vflag = true;
break;
default:
exit(EXIT_FAILURE);
exit(2);
}
if(optind == argc) {
fprintf(stderr, "usage: %s [-cilnqv] pattern [files...]\n", argv[0]);