All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeffrey Holle <jeff.holle@verizon.net>
To: linux-console@vger.kernel.org
Subject: encapulating a find function in a script
Date: Wed, 14 Jan 2004 16:19:02 -0800	[thread overview]
Message-ID: <bu4met$1la$1@sea.gmane.org> (raw)

I'm having a problem with a simple script I'm trying to develop.

Its name is fgrep and its text is:

	#!/bin/bash
	find $1 -name $2 -exec grep -H $3 '{}' ';'

I want to use it like "dgrep 'directory' 'file pattern' 'match text'.

It doesn't match anything because of the $2 parameter.  If I replace 
"$2" with "*.cpp", it works.

Can anybody tell me what is wrong and how to fix it?



             reply	other threads:[~2004-01-15  0:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-15  0:19 Jeffrey Holle [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-01-15  0:34 encapulating a find function in a script BobGian
2004-01-15  1:00 ` Mike Castle
2004-01-15  1:55 ` Jeffrey Holle
2004-01-16 21:09   ` Jeffrey Holle
2004-01-16 19:53 BobGian
2004-01-16 20:09 ` Mike Castle

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='bu4met$1la$1@sea.gmane.org' \
    --to=jeff.holle@verizon.net \
    --cc=linux-console@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.