diff options
author | Pádraig Brady <P@draigBrady.com> | 2011-05-20 01:18:28 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2011-05-26 00:23:11 +0100 |
commit | bfffa909477924eaaa2a5e20ee44be087b0ac87d (patch) | |
tree | bc8a1a5f03840ac4997ef6006086c090e0611bb7 /src | |
parent | 6eec064597c2f440c51146cac85dc2326a0e0cda (diff) | |
download | coreutils-bfffa909477924eaaa2a5e20ee44be087b0ac87d.tar.xz |
split: diagnose when --filter is used with a chunk number
* src/split.c (main): Exit with a diagnostic if --filter
is specified along with a specific chunk number.
* test/split/filter: Ensure this combination fails.
Diffstat (limited to 'src')
-rw-r--r-- | src/split.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/split.c b/src/split.c index 5e203f1b7..9e23f8689 100644 --- a/src/split.c +++ b/src/split.c @@ -1175,6 +1175,12 @@ main (int argc, char **argv) } } + if (k_units != 0 && filter_command) + { + error (0, 0, _("--filter does not process a chunk extracted to stdout")); + usage (EXIT_FAILURE); + } + /* Handle default case. */ if (split_type == type_undef) { |