From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1FqnhQ-0004cK-JG for garchives@archives.gentoo.org; Thu, 15 Jun 2006 08:59:37 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.7/8.13.6) with SMTP id k5F8wGHv005703; Thu, 15 Jun 2006 08:58:16 GMT Received: from heisenberg.zen.co.uk (heisenberg.zen.co.uk [212.23.3.141]) by robin.gentoo.org (8.13.7/8.13.6) with ESMTP id k5F8rRh1010967 for ; Thu, 15 Jun 2006 08:53:28 GMT Received: from [82.69.83.178] (helo=desiato.digimed.co.uk) by heisenberg.zen.co.uk with esmtp (Exim 4.30) id 1FqnbU-0008Oo-1O for gentoo-user@lists.gentoo.org; Thu, 15 Jun 2006 08:53:28 +0000 Received: from krikkit.digimed.co.uk (krikkit.digimed.co.uk [192.168.1.3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by desiato.digimed.co.uk (Postfix) with ESMTP id D9A6114249B2 for ; Thu, 15 Jun 2006 09:53:26 +0100 (BST) Date: Thu, 15 Jun 2006 09:53:23 +0100 From: Neil Bothwick To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] splitdebug Message-ID: <20060615095323.3712545c@krikkit.digimed.co.uk> In-Reply-To: <7573e9640606141701m41ed179cs4bbfe7b5db4c1dc6@mail.gmail.com> References: <200606142257.35341.bo.andresen@zlin.dk> <7573e9640606141428u5ec18658ga41edbee8c2d3f01@mail.gmail.com> <200606142345.17687.bo.andresen@zlin.dk> <7573e9640606141701m41ed179cs4bbfe7b5db4c1dc6@mail.gmail.com> Organization: Digital Media Production X-Mailer: Sylpheed-Claws 2.3.0 (GTK+ 2.8.18; powerpc-unknown-linux-gnu) X-GPG-Fingerprint: 7260 0F33 97EC 2F1E 7667 FE37 BA6E 1A97 4375 1903 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary=Sig_uBzjAq8VwpuciA0PsA2wDSq; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-Originating-Heisenberg-IP: [82.69.83.178] X-Archives-Salt: fb8bfd29-d980-4a54-802b-67c56bfb4616 X-Archives-Hash: f889ad09139cf08ddabd6fd996c9b70d --Sig_uBzjAq8VwpuciA0PsA2wDSq Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 14 Jun 2006 17:01:18 -0700, Richard Fish wrote: > ldd `which kontact kmail knode akregator` | grep '=3D>' | awk '{print > $3}' \ > | sort | uniq | xargs equery belongs | grep '/' | sort | uniq \ > | xargs printf "=3D%s\n" | xargs emerge -p --oneshot >=20 > (Ok people, have at it. Show me how you can do this in 5 commands or > less.) That should be "five commands or fewer" :) awk does pattern matching, so you can drop the first grep and use awk '/=3D>/ {print $3}' The second grep appears redundant too, when i tried this, all lines contained '/'. Both invocations of uniq are unnecessary, use sort -u instead. Replacing 'xargs printf "=3D%s\n"' with 'sed s/^/=3D/' is technically one less command, although the same number of pipeline stages. So that's five commands removed without thinking or adding anything original... I should be a consultant :) --=20 Neil Bothwick WinErr 01B: Illegal error - You are not allowed to get this error. Next time you will get a penalty for that. --Sig_uBzjAq8VwpuciA0PsA2wDSq Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iD8DBQFEkSAGum4al0N1GQMRAt1VAKDEkYE63wmIk6/pzCryvCEEjdKDsACgugr9 qJAkg1LQ3DB6xt7er4oXY1I= =FA6c -----END PGP SIGNATURE----- --Sig_uBzjAq8VwpuciA0PsA2wDSq-- -- gentoo-user@gentoo.org mailing list