From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26723 invoked by alias); 27 Jan 2014 04:27:34 -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: 18374 Received: (qmail 27099 invoked from network); 27 Jan 2014 04:27:19 -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.6 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=9E7fSQX3cS3tU8ewG3g4FPwTUqWmJzn0VAqAJ85TsEI=; b=erdPtKEKZTb2piH4SWZs6Ma6ZzsP/spJN3Pmv6LTQdvgddMq59miwPvWRKq30AoH/h hWdKyYZFOHyAEvWfUuJYWULwNsfFTuEZd7QKUUKTQvq8ob723gMwqHd2r5ZiQMc5rtXw 3xDoqQZb9NPQGTCHCjPZj5Q8tzfIwbSPlQkJwXDgUNfPZqGCloIxYKacZthc1RgMjZWP aucpzQM4MUjL9fjRFOoP9ceO+czcY2VKFZtAXnzkHjiu11VgP6CyHSpQHxrSIKSu/X6s FU0SXX37J3Omys51GnGuZ6zh9OjWqJOrQuhnkXZPMvP8vC+6SQtfj38dZdKDkAFO4mQ4 ZD+A== X-Gm-Message-State: ALoCoQkQvD0pDprTktvh27seMmqJI1bVx0PJzB0BZC2SZ8C8lhVab38UP5qe14bfgmn4K1rPwRUt MIME-Version: 1.0 X-Received: by 10.68.40.138 with SMTP id x10mr14729465pbk.8.1390796835988; Sun, 26 Jan 2014 20:27:15 -0800 (PST) In-Reply-To: <140126202020.ZM19008@torch.brasslantern.com> References: <20140125055411.GA3794@solfire> <20140127015951.GA56068@redoubt.spodhuis.org> <140126202020.ZM19008@torch.brasslantern.com> Date: Sun, 26 Jan 2014 20:27:15 -0800 Message-ID: Subject: Re: "ls" output like find ... -print0 anyhow ??? From: Kurtis Rader To: Bart Schaefer Cc: Zsh Users Content-Type: multipart/alternative; boundary=bcaec544ece25deee604f0ec1f43 --bcaec544ece25deee604f0ec1f43 Content-Type: text/plain; charset=UTF-8 I recognize that your example is artificial but it does not support arbitrary "ls" options. It seems to me that ~meino is asking the wrong question. On Sun, Jan 26, 2014 at 8:20 PM, Bart Schaefer wrote: > On Jan 26, 8:59pm, Phil Pennock wrote: > } > } I'd use the print builtin of zsh, so that there are no argv length > } limitations, combined with zsh's very powerful glob operators. > > Meino mentioned in private email that he has particular reasons for > using "ls" instead of "find". If the options of "ls" are important > (rather than just the file names) and you don't need to worry too > much about CPU consumption: > > print -N -- **/*(.e:'reply=("$(ls -l "$REPLY")")':) | xargs -0 ... > > That's going to run "ls -l" once for each plain file (.) below the > current directory, so it's a lot more process-intensive than a single > "ls -lR", and it may not sort in the order you expect, but it will > give you "ls" output with $'\0'-terminated lines. > -- Kurtis Rader Caretaker of the exceptional canines Junior and Hank --bcaec544ece25deee604f0ec1f43--