grep: make E and F flags mutually exclusive
Don't make F the priority flag when both E and F are given, instead use the last one.
This commit is contained in:
parent
16159a61ac
commit
eeeb7a6e53
3
grep.c
3
grep.c
@ -183,10 +183,13 @@ main(int argc, char *argv[])
|
|||||||
ARGBEGIN {
|
ARGBEGIN {
|
||||||
case 'E':
|
case 'E':
|
||||||
Eflag = 1;
|
Eflag = 1;
|
||||||
|
Fflag = 0;
|
||||||
flags |= REG_EXTENDED;
|
flags |= REG_EXTENDED;
|
||||||
break;
|
break;
|
||||||
case 'F':
|
case 'F':
|
||||||
Fflag = 1;
|
Fflag = 1;
|
||||||
|
Eflag = 0;
|
||||||
|
flags &= ~REG_EXTENDED;
|
||||||
break;
|
break;
|
||||||
case 'H':
|
case 'H':
|
||||||
Hflag = 1;
|
Hflag = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user