> dirname: too many arguments
> Try `dirname --help' for more information.
>
>
> instead i had to get jiggy and issue
>
> for i in `locate asterisk` ; do dirname $i ; done | sort | uniq
>
> why doesn't dirname eat the stdin from xargs ( i tried a bunch or xargs
> switches -d and -e to no avail.)
Because dirname is documented as taking exactly one argument,
thanks to POSIX. Try xargs -L 1 to force one filename per dirname
invocation (although that does turn into as many processes as your
for loop). Or consider using a sed script instead, to reduce the
process load of computing multiple dirnames over a list.
--
Eric Blake