From: Michael Heiming <michael@heiming.de>
Subject: Re: Searching for text in a file
Date: Wed, 30 May 2001 08:24:46 +0200 [thread overview]
Message-ID: <3B14922E.ED570967@heiming.de> (raw)
In-Reply-To: 3b13fcaa@nubby2.
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 <search_for> <search_path>
SW=${1}
SP=${2}
if [ $# -ne 2 ]
then
echo "usage: rgrep <search_for> <search_path>"
exit 1
fi
find $SP -type f -exec grep $SW {} /dev/null \;
Good luck
Michael Heiming
next prev parent reply other threads:[~2001-05-30 6:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3b13fcaa@nubby2.>
2001-05-29 20:38 ` Searching for text in a file Stuart R. Fuller
2001-05-29 20:38 ` Stuart R. Fuller
2001-05-30 17:22 ` Mario Stargard
2001-05-30 6:24 ` Michael Heiming [this message]
2001-05-29 20:54 Bob Harris
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox