From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,6761a3df32166c33,start X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2001-05-29 23:22:41 PST Message-ID: <3B14922E.ED570967@heiming.de> Date: Wed, 30 May 2001 08:24:46 +0200 From: Michael Heiming X-Mailer: Mozilla 4.74 [en] (X11; U; Linux 2.2.16 i686) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.unix.tru64 Subject: Re: Searching for text in a file References: <3b13fcaa@nubby2.> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: dialup-528.germany.ecore.net X-Trace: news.ecore.net 991203739 dialup-528.germany.ecore.net (30 May 2001 06:22:19 GMT) X-Complaints-To: abuse@ecore.net Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.germany.net!news.ecore.net!not-for-mail Xref: archiver1.google.com comp.unix.tru64:2343 Aaron Banks wrote: > > This may be simple. I want to search for a certain text string in all files > on my system. How do I do that? Hello, using ksh: #!/bin/ksh # grep -r with ksh # michael@heiming.de - 2001-04-08 # usage: rgrep SW=${1} SP=${2} if [ $# -ne 2 ] then echo "usage: rgrep " exit 1 fi find $SP -type f -exec grep $SW {} /dev/null \; Good luck Michael Heiming