On Wednesday 21 December 2005 14:50, "Boyd Stephen Smith Jr." <[EMAIL PROTECTED]> wrote about 'Re: [gentoo-user] USE flags, command line and packages.use': > for pkg in $(cat /var/lib/portage/world); do > FAKE_USE=$(equery u "$pkg") > USE="" > for use in $FAKE_USE; do > USE="$USE ${use##+}" > done > echo "$pkg""$USE"; > done >> /etc/portage/package.use > > Or something like that.
Not that this is bash-golf or anything, but I think it's better to do it like this: for pkg in $(cat /var/lib/portage/world); do echo "$pkg$(echo $(equery u "$pkg") | sed -re 's/(^|[[:space:]])\+/ /g')"; done >> /etc/portage/package.use -- Boyd Stephen Smith Jr. [EMAIL PROTECTED] ICQ: 514984 YM/AIM: DaTwinkDaddy -- gentoo-user@gentoo.org mailing list