"grep" not working
David Bandel
david.bandel
Thu May 17 04:02:58 PDT 2007
On 5/17/07, Dirk Moolman <DirkM at agilitytech.co.za> wrote:
> This is something I haven't seen before. One of my developers, uses
> grep to assist in client queries (to find files and info in unload
> files).
>
> When she does a grep on certain strings, she can't find anything, but
> when I do the same grep, logged in as root, I find data.
>
> What would cause this ? I will have to compare her login with root's
> login, but I would appreciate some suggestions / tips from the guru's.
>
This is usually a permissions problem. If she doesn't have permission
to read the file, the grep will fail. You should get an error message
unless you have added 2>/dev/null at the end redirecting the error
channel to the bit bucket.
Also ensure that both of your grep strings are _identical_. Other
than that, grep is grep.
I also assume you as root and she are running the same grep binary.
Use `which grep` to make sure.
Ciao,
David A. Bandel
--
Focus on the dream, not the competition.
- Nemesis Air Racing Team motto
More information about the Linux-users
mailing list