for DIR in `ls -d /home/*` do grep -R a-string $DIR/logs/ doneJames
Fyi, you can do this with the ls.
for dir in /home/*
do
if [ -d $dir ]
then
...
fi
done
In a real-world script you might also say
"${dir}"
rather than
$dir
to allow nasty filenames.
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
