[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: bug in fgrep from http://unxutils.sourceforge.net/ - problem solved
From: |
Jack Thompson |
Subject: |
RE: bug in fgrep from http://unxutils.sourceforge.net/ - problem solved |
Date: |
Wed, 24 Aug 2005 10:58:00 -0700 |
Thanks Chuck - fgrep "def" *.* works fine - unfortunately I don't have a
real shell to work with, and I don't want to download cygwin right now -
but I might soon if I can't get the dev studio to work right.
-----Original Message-----
From: Chuck Swiger [mailto:address@hidden
Sent: Wednesday, August 24, 2005 10:23 AM
To: Jack Thompson
Cc: address@hidden
Subject: Re: bug in fgrep from http://unxutils.sourceforge.net/
Jack Thompson wrote:
> Thanks for your quick reply. My ESP is quite limited, so I better
just
> paste my command ...
>
> fgrep -r "def" *.py
[ ... ]
> When I work on UNIX systems, I usually just use find and pipe the
files
> through grep - maybe I'm not using fgrep right????
You can't combine shell expansion of the asterisk with -r, because -r
wants the
names of directories, whereas the "*.py" matches only Python files.
Consider the following:
fgrep -r "def" .
fgrep "def" *.py */*.py */*/*.py
fgrep "def" **/*.py # this depends on your shell
find . -name "*.py" | xargs fgrep "def"
find . -name "*.py" -print0 | xargs -0 fgrep "def"
--
-Chuck
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- RE: bug in fgrep from http://unxutils.sourceforge.net/ - problem solved,
Jack Thompson <=