From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4672 invoked by alias); 27 Jan 2014 03:49:48 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 18372 Received: (qmail 20882 invoked from network); 27 Jan 2014 03:49:44 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=la2CBwunzaiQaiSoRa2+ocv+Zm9Tbwog/HJKDsdseDw=; b=oI6KcM5bqrFta3B+dQCV7RALVxf2MRxqEh8iSUDqJRLPhDSnFlzVFV5zBVJONxMzYx YWvqavXuRgBB0J2nKEAiAlfEQCeUK/+LflbfB+CuSqxBQxMt1/Z8ehTcAdqADZtLIVEC I5gO2HG5yIFeN3oDD9HnwQ5ZknkS3zuvkkkEwEuo2DNJv5tPTALEsfkrHyWfBc05IFwf icUtOFzPVBP/ZN7fsaoIwFCy/XgXUion7IGLPbOsGUy2NCnAbWwIJ13nExUzk62XGn7p 2MaIesg5C2IqfPCDXT+Y4u87T4Qzd2iBE0UPOrL83R2KHiqz6TOoRLJqG5n41HOk03kn wvcg== MIME-Version: 1.0 X-Received: by 10.224.103.131 with SMTP id k3mr697904qao.102.1390794577393; Sun, 26 Jan 2014 19:49:37 -0800 (PST) In-Reply-To: <20140127015951.GA56068@redoubt.spodhuis.org> References: <20140125055411.GA3794@solfire> <20140127015951.GA56068@redoubt.spodhuis.org> Date: Mon, 27 Jan 2014 04:49:37 +0100 Message-ID: Subject: Re: "ls" output like find ... -print0 anyhow ??? From: Mikael Magnusson To: meino.cramer@gmx.de, Zsh Users Content-Type: text/plain; charset=UTF-8 On 27 January 2014 02:59, Phil Pennock wrote: > On 2014-01-25 at 06:54 +0100, meino.cramer@gmx.de wrote: >> is there a way to temporary convince 'ls' to act that way, that I can >> use '| xargs -0' with it? >> >> Thank ypu very much in advance for any help! > > I'd use the print builtin of zsh, so that there are no argv length > limitations, combined with zsh's very powerful glob operators. > > print -N **/*.c(mM-1) | xargs -0 ... > > The `print -N` uses NUL characters between arguments, for compatibility > with `xargs -0`, and the example glob finds all .c files anywhere under > the current directory which were modified in the past month. > > -Phil If you use the print builtin, make sure to also use -r to not do backslash expansions. -- Mikael Magnusson