From 864cb02be27117c8975516a1c4ac29e99604c0ba Mon Sep 17 00:00:00 2001 From: jmallett Date: Mon, 6 May 2002 03:38:28 +0000 Subject: -I and -J both set the same variable, replstr, to the string to replace with a line of input, and both work differently, so prevent them from both being passed to xargs(1). --- usr.bin/xargs/xargs.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'usr.bin/xargs') diff --git a/usr.bin/xargs/xargs.c b/usr.bin/xargs/xargs.c index 8c4d11a..d13b23a 100644 --- a/usr.bin/xargs/xargs.c +++ b/usr.bin/xargs/xargs.c @@ -169,6 +169,8 @@ main(int argc, char **argv) argc -= optind; argv += optind; + if (Iflag && Jflag) + errx(1, "the -I and -J options may not be used together"); if (xflag && !nflag) usage(); if (Iflag || Lflag) -- cgit v1.1