diff options
author | imp <imp@FreeBSD.org> | 2010-04-13 01:02:20 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2010-04-13 01:02:20 +0000 |
commit | b81ac36cf0386849cc6f35b3bb8b2f59f5b92ec9 (patch) | |
tree | 5c793c579e3ec912de9a0bdc70155e767de7a62e /usr.bin/sed | |
parent | 022d18693e4e5cf4587826bb0958c72a05af0a9e (diff) | |
download | FreeBSD-src-b81ac36cf0386849cc6f35b3bb8b2f59f5b92ec9.zip FreeBSD-src-b81ac36cf0386849cc6f35b3bb8b2f59f5b92ec9.tar.gz |
MFC: 205992
Make -r mean exactly the same thing as -E for increased compatibility
with GNU sed.
MFC after: 7 days
Diffstat (limited to 'usr.bin/sed')
-rw-r--r-- | usr.bin/sed/main.c | 3 | ||||
-rw-r--r-- | usr.bin/sed/sed.1 | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/usr.bin/sed/main.c b/usr.bin/sed/main.c index 1a140b1..8d4fe95 100644 --- a/usr.bin/sed/main.c +++ b/usr.bin/sed/main.c @@ -130,8 +130,9 @@ main(int argc, char *argv[]) fflag = 0; inplace = NULL; - while ((c = getopt(argc, argv, "EI:ae:f:i:ln")) != -1) + while ((c = getopt(argc, argv, "EI:ae:f:i:lnr")) != -1) switch (c) { + case 'r': /* Gnu sed compat */ case 'E': rflags = REG_EXTENDED; break; diff --git a/usr.bin/sed/sed.1 b/usr.bin/sed/sed.1 index d5858ff..0744630 100644 --- a/usr.bin/sed/sed.1 +++ b/usr.bin/sed/sed.1 @@ -39,11 +39,11 @@ .Nd stream editor .Sh SYNOPSIS .Nm -.Op Fl Ealn +.Op Fl Ealnr .Ar command .Op Ar .Nm -.Op Fl Ealn +.Op Fl Ealnr .Op Fl e Ar command .Op Fl f Ar command_file .Op Fl I Ar extension @@ -144,6 +144,10 @@ all of the commands have been applied to it. The .Fl n option suppresses this behavior. +.It Fl r +Same as +.Fl E +for compatibility with GNU sed. .El .Pp The form of a |