> On Sat, 27 Oct 2012 15:34:00 -0700 > Dima Kogan wrote: > > I can't seem to get the -n option in zargs to work right. This looks like a bug > to me, but maybe I'm not using it correctly: > > dima@shorty:/tmp$ ls -l > total 12 > -rw-r--r-- 1 dima dima 1 Oct 27 15:29 1 > -rw-r--r-- 1 dima dima 5 Oct 27 15:29 2 > -rw-r--r-- 1 dima dima 5 Oct 27 15:29 3 > > > dima@shorty:/tmp$ zargs -- * -- ls -l > -rw-r--r-- 1 dima dima 1 Oct 27 15:29 1 > -rw-r--r-- 1 dima dima 5 Oct 27 15:29 2 > -rw-r--r-- 1 dima dima 5 Oct 27 15:29 3 > > dima@shorty:/tmp$ zargs -- * -- ls > 1 2 3 > > dima@shorty:/tmp$ zargs -n1 -- * -- ls > 1 > 2 > 3 > > dima@shorty:/tmp$ zargs -n1 -- * -- ls -l > zargs: argument list too long Attached is a patch that fixes this. There was some misbehaving logic in the script. I don't understand why that logic was ever necessary. Does anybody know why the value of $n was connected to the value of $c at all?