From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 13 12:23:20 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EB421065673; Sat, 13 Sep 2008 12:23:20 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from acme.spoerlein.net (cl-43.dus-01.de.sixxs.net [IPv6:2a01:198:200:2a::2]) by mx1.freebsd.org (Postfix) with ESMTP id E2C598FC16; Sat, 13 Sep 2008 12:23:19 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from roadrunner.spoerlein.net (e180139087.adsl.alicedsl.de [85.180.139.87]) by acme.spoerlein.net (8.14.2/8.14.2) with ESMTP id m8DCNHBn062439 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 13 Sep 2008 14:23:18 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Received: from roadrunner.spoerlein.net (localhost [127.0.0.1]) by roadrunner.spoerlein.net (8.14.2/8.14.2) with ESMTP id m8DBpM0f060605 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 13 Sep 2008 13:51:22 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Received: (from uqs@localhost) by roadrunner.spoerlein.net (8.14.2/8.14.2/Submit) id m8DBpM6S060604; Sat, 13 Sep 2008 13:51:22 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Date: Sat, 13 Sep 2008 13:51:22 +0200 From: Ulrich Spoerlein To: freebsd-hackers@FreeBSD.ORG, koitsu@FreeBSD.ORG Message-ID: <20080913115122.GK76117@roadrunner.spoerlein.net> Mail-Followup-To: freebsd-hackers@FreeBSD.ORG, koitsu@FreeBSD.ORG References: <20080905143915.GA60002@icarus.home.lan> <200809081347.m88DlK8T074926@lurza.secnetix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200809081347.m88DlK8T074926@lurza.secnetix.de> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Subject: Re: Extending find(1) to support -printf X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2008 12:23:20 -0000 Pretty late to the game, but ... On Mon, 08.09.2008 at 15:47:20 +0200, Oliver Fromme wrote: > Jeremy Chadwick wrote: > > Equally as frustrating, mutt's backtick support will only honour the > > first line of input. If a backticked command returns multiple lines, > > only the first is read; the rest are ignored. > > Well, you can convert back and forth between spaces > and newlines with tr(1): > > echo * | tr ' ' '\n' | grep -v whatever | tr '\n' ' ' If your data is not very large, you can also fool xargs(1) into doing the conversion for you $ echo * | xargs -n1 and $ ls -1 | xargs > It's not pretty, but it should work. Note that ls(1) > prints one file name per line, so you can simplify the > above line like this: > > ls | grep -v whatever | tr '\n' ' ' > > By the way, I often use zsh in such cases. It supports > "extended globbing", for example, the wildcard expression > *~*.(gz|bz2) matches all files _except_ the ones that end > with .gz or .bz2. Indeed much more useful than fighting with find(1) and passing the file lists around. Cheers, Ulrich Spoerlein -- It is better to remain silent and be thought a fool, than to speak, and remove all doubt.