From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sun, 10 Jun 2007 16:10:43 -0400 From: Kris Maglione To: 9fans@cse.psu.edu Subject: Re: [9fans] Is there a Plan 9 equivalent of the find command Message-ID: <20070610201043.GE9948@kris.home> References: <45609539-34EC-4F53-AECF-769F401EC6F0@tinker.com> <91a1fb6e98d42debf18ceddc41f159c3@coraid.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="X3gaHHMYHkYqP6yf" Content-Disposition: inline In-Reply-To: <91a1fb6e98d42debf18ceddc41f159c3@coraid.com> User-Agent: Mutt/1.5.15 (2007-04-06) Topicbox-Message-UUID: 7c64478e-ead2-11e9-9d60-3106f5b1d025 --X3gaHHMYHkYqP6yf Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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=3D' ' while(l=3D`{sed 10q}) { grep -n some_pattern $l } -- find -- #!/bin/rc du -a | sed 's/[^ ]* //' -- xarg -- #!/bin/rc rfork s n=3D10 if(~ $1 -l) { n =3D $2 shift 2 } {read -m; echo -n 'interrupted' >/proc/$pid/notepg} | while() { ifs=3D' ' { l =3D `{sed $n^q } } $* $l } -- -- find . | xarg grep -n some_pattern --=20 Kris Maglione Roses are red violets are blue I am schizophrenic and so am I --X3gaHHMYHkYqP6yf Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.3 (FreeBSD) iD8DBQFGbFrDseQZD8Aui4wRAixcAKCJg1frzgxRGDBNSYWgyoigTgATzgCfXeKM BgZIHPscf85em03KA4rqRbc= =pHO1 -----END PGP SIGNATURE----- --X3gaHHMYHkYqP6yf--