diff options
Diffstat (limited to 'coreutils/tail.c')
-rw-r--r-- | coreutils/tail.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/coreutils/tail.c b/coreutils/tail.c index 0c8dec26a..8201c80a0 100644 --- a/coreutils/tail.c +++ b/coreutils/tail.c | |||
@@ -68,6 +68,11 @@ int tail_main(int argc, char **argv) | |||
68 | char *s, *start, *end, buf[BUFSIZ]; | 68 | char *s, *start, *end, buf[BUFSIZ]; |
69 | int i, opt; | 69 | int i, opt; |
70 | 70 | ||
71 | if (( argc >= 2 ) && ( strlen ( argv [1] ) >= 2 ) && ( argv [1][0] == '-' ) && isdigit ( argv [1][1] )) { | ||
72 | count = atoi ( &argv [1][1] ); | ||
73 | optind = 2; | ||
74 | } | ||
75 | |||
71 | while ((opt = getopt(argc, argv, "c:fhn:q:s:v")) > 0) { | 76 | while ((opt = getopt(argc, argv, "c:fhn:q:s:v")) > 0) { |
72 | switch (opt) { | 77 | switch (opt) { |
73 | case 'f': | 78 | case 'f': |