DJ Lucas wrote: > for FILE in `echo > linux/{acct.h,quota.h,resource.h,socket.h,stat.h,time.h,timex.h,un.h,wait.h}`
Er, hang on here -- why are the echo and the backquotes in there? (I should note that they're in Jürg's script as well.) They gain nothing, and waste at least one process. (I believe this is one of the Useless Uses of Backticks, but I could be wrong on that.) When you use brace expansion, the shell doesn't omit files that don't exist (like it does when you use pathname expansion, i.e. globbing). So the braces get expanded by the shell into: linux/acct.h linux/quota.h linux/resource.h ... all the time, whether or not those files exist. Then the echo runs, as do the backquotes, and you get this "for" command out: for FILE in linux/acct.h linux/quota.h linux/resource.h ... So there's really no point in having the backquotes or the echo; just make this be: for FILE in linux/{acct.h,quota.h,resource.h,...} And likewise for all the other loops in the script. That's at least a little better in terms of number of processes.
signature.asc
Description: OpenPGP digital signature
-- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page