On Saturday 13 November 2010 19:02:33 Denys Vlasenko wrote: > On Tuesday 09 November 2010 07:40, Rob Landley wrote: > > Or any set -o for that matter. But pipefail's one that's really hard to > > work around if you haven't got it... > > But this will increase complexity, would it not?
Are you being facetious? I can't tell in email. If you can tell me how to both pipe the output of a command to tee _and_ tell whether nor not the command exited with a nonzero exit code without it, I'm all ears. I couldn't figure out how to do so without firing up a subshell and signaling result state via the filesystem, which means adding a trap handler to clean up the file if it's interrupted (which still won't handle kill -9) and is basically "too disgusting for words" compared to pipefail. Heck, the BSD guys backported pipefail to ksh, it's that useful. Complexity is a cost, the functionality you get in return needs to be worth that cost. I'm talking about getting the most functionality for the least complexity. Sometimes you give up functionality that's too complex to be worth it, and sometimes you have to abandon a wonderfully simple approach because it just can't do what you need. If you want to reduce complexity of the project unconditionally, "rm -rf *" in the source tree can't be beat. You'll never get simpler than the end result of that. Rob -- GPLv3: as worthy a successor as The Phantom Menace, as timely as Duke Nukem Forever, and as welcome as New Coke. _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
