Lars wrote regarding 'Re: [SLE] Md5sum file from dir' on Fri, Jan 21 at 13:05:
On Friday 21 January 2005 18:49, Danny Sauer wrote: [...]
I always thought that xargs ran a new instance of the exec()'d program for each individual argument. Hmph. I guess that'd explain [...] You can also use 'xargs -n 1' to execute the command with a single argument at a time.
I normally just reimplement that kind of behavior in perl - which is my standard solution when the shell won't do what I want. :) I've never actually used xargs, except when I was benchmarking it against find. Though, having read the man page now, I think I may have a use for the process accounting ability - the -P option - where I've wanted to make a few jobs run in parallel, but I haven't gotten around to actually implementing the logic neccesary to keep track of fork()'d children... Darn you people. I clearly said that I didn't want to have to remember more than one thing, but this discussion has forced me to not only read and understand the sorce for xargs, but also to consider rewriting several maintenence scripts. I already had enough to do! Randall, does that answer your question as to whether this is a good day or not? :) --Danny, happy to have some new "interesting" work that'll be good to break up the more mundane.