diff options
author | Jim Meyering <jim@meyering.net> | 1993-05-01 20:31:22 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1993-05-01 20:31:22 +0000 |
commit | d7fcb354de9387e778645abe75492786788f5381 (patch) | |
tree | 9021eabb2a3818d88881581caf14724fb26d7028 /src/uniq.c | |
parent | cd3f5c47d5cc6ff344b763a24b33316d97c92a50 (diff) | |
download | coreutils-d7fcb354de9387e778645abe75492786788f5381.tar.xz |
merge with 1.4.2.
Diffstat (limited to 'src/uniq.c')
-rw-r--r-- | src/uniq.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/uniq.c b/src/uniq.c index b902602a5..20fa6d565 100644 --- a/src/uniq.c +++ b/src/uniq.c @@ -159,8 +159,13 @@ main (argc, argv) if (flag_help) usage (); - while (optind < argc && argv[optind][0] == '+') - skip_chars = atoi (argv[optind++]); + if (optind >= 2 && strcmp (argv[optind - 1], "--") != 0) + { + /* Interpret non-option arguments with leading `+' only + if we haven't seen `--'. */ + while (optind < argc && argv[optind][0] == '+') + skip_chars = atoi (argv[optind++]); + } if (optind < argc) infile = argv[optind++]; |