This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: Easy, quick, BASH question
- From: "Stephen C. Biggs" <s_c_biggs at bigfoot dot com>
- To: "cygwin at cygwin dot com'" <cygwin at cygwin dot com>
- Date: Fri, 2 Aug 2002 19:11:01 -0700
- Subject: Re: Easy, quick, BASH question
$ function hcgrep()(find "$PWD" -name "*.[ch]" -type f -exec grep -n -H "$*" {} \;)
$ hcgrep include
... works.
According to the "man" page for bash, alias does not take arguments.
On 2 Aug 2002 at 16:04, Barnhart, Kevin wrote:
> I'm trying to setup an alias for grep that recursively looks through all .c
> and .h files for a string. So far I've tried variations of:
>
> alias hcgrep='grep -n "$*" $(find . -name '*.[ch]')'
>
> There's probably just one little thing I'm missing...
>
> Thanks,
> Kevin
>
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting: http://cygwin.com/bugs.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
>
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/