summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorfenner <fenner@FreeBSD.org>2001-10-02 06:22:01 +0000
committerfenner <fenner@FreeBSD.org>2001-10-02 06:22:01 +0000
commitefade0125df43c37f968538a299c96fc36ac232a (patch)
treeb34e8a76e460015c8574b6f0e30f4aa5a07c1f42 /usr.bin
parent0109c69c2145b52111be525171485f73f3945ce4 (diff)
downloadFreeBSD-src-efade0125df43c37f968538a299c96fc36ac232a.zip
FreeBSD-src-efade0125df43c37f968538a299c96fc36ac232a.tar.gz
Allow "obsolete" (but commonly-used) command line style to be used
with -F, e.g. tail -1 -F /var/log/messages. Submitted by: Maxim Konovalov <maxim@macomnet.ru>
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tail/tail.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tail/tail.c b/usr.bin/tail/tail.c
index 9b7d9a2..aaa6b0c 100644
--- a/usr.bin/tail/tail.c
+++ b/usr.bin/tail/tail.c
@@ -216,7 +216,7 @@ main(argc, argv)
/*
* Convert the obsolete argument form into something that getopt can handle.
- * This means that anything of the form [+-][0-9][0-9]*[lbc][fr] that isn't
+ * This means that anything of the form [+-][0-9][0-9]*[lbc][Ffr] that isn't
* the option argument for a -b, -c or -n option gets converted.
*/
static void
@@ -252,7 +252,7 @@ obsolete(argv)
* output style characters.
*/
t = *argv + len - 1;
- if (*t == 'f' || *t == 'r') {
+ if (*t == 'F' || *t == 'f' || *t == 'r') {
*p++ = *t;
*t-- = '\0';
}
@@ -291,6 +291,7 @@ obsolete(argv)
++argv;
/* FALLTHROUGH */
/* Options w/o arguments, continue with the next option. */
+ case 'F':
case 'f':
case 'r':
continue;
OpenPOWER on IntegriCloud