9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Kris Maglione <bsdaemon@comcast.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Is there a Plan 9 equivalent of the find command
Date: Sun, 10 Jun 2007 16:10:43 -0400	[thread overview]
Message-ID: <20070610201043.GE9948@kris.home> (raw)
In-Reply-To: <91a1fb6e98d42debf18ceddc41f159c3@coraid.com>

[-- Attachment #1: Type: text/plain, Size: 730 bytes --]

On Sun, Jun 10, 2007 at 03:44:31PM -0400, erik quanstrom wrote:
>	find . | grep pattern

There are tens of scripts in contrib which do that with du.

But the request was for something more like:

grep some_pattern */*

or

grep some_pattern `{find .}

or

find . | read -m |
ifs='
' while(l=`{sed 10q}) {
	grep -n some_pattern $l
}

-- find --
#!/bin/rc

du -a | sed 's/[^	]*	//'

-- xarg --
#!/bin/rc
rfork s

n=10
if(~ $1 -l) {
	n = $2
	shift 2
}

{read -m; echo -n 'interrupted' >/proc/$pid/notepg} |
while() {
	ifs='
'	{ l = `{sed $n^q } }
	$* $l
}

-- --

find . | xarg grep -n some_pattern

-- 
Kris Maglione

Roses are red violets are blue
I am schizophrenic and so am I

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

  reply	other threads:[~2007-06-10 20:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-10 19:32 Kim Shrier
2007-06-10 19:44 ` Kris Maglione
2007-06-10 19:44 ` erik quanstrom
2007-06-10 20:10   ` Kris Maglione [this message]
2007-06-11 18:09     ` Federico Benavento
2007-06-17  7:27 ` Dan Cross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070610201043.GE9948@kris.home \
    --to=bsdaemon@comcast.net \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).