sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit 1bc2296bac00f7dd0ffc41494896da7a2b1689cb
parent b744ad5216e4ab66151d97086162c8cf8aff8380
Author: sin <sin@2f30.org>
Date:   Thu Jan 16 10:56:13 +0000

Double NARGS

I just ran a simple one-liner[1] to find the average filepath
length on my system (absolute paths) and that came up with a value
~90 characters.  Assume this is out by a factor of two, we still
have potentially 5000 more arguments that we can put into the buffer.

Surely one might run xargs(1) on something that is not a filename.
We just choose to accomodate the common use-case as much as possible.

[1] find / 2>/dev/null | awk '{print length($0)}' \
	| awk '{a+=$1}END{print "average filepath length: ",a/NR}'

Diffstat:
xargs.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xargs.c b/xargs.c @@ -9,7 +9,7 @@ #include "util.h" enum { - NARGS = 5000 + NARGS = 10000 }; static int inputc(void);