bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grep bug?


From: Bob Proulx
Subject: Re: grep bug?
Date: Thu, 18 Aug 2005 10:41:25 -0600
User-agent: Mutt/1.5.9i

Larry McNaughton wrote:
> I'm using OS X 10.4.2 (Tiger) on a G5 Dual 1.8, when I was using
> 10.3 a few months ago I had attempted to use fink without success,
> so when I installed Tiger I uninstalled fink and used Spotlight to
> find associated fink files and deleted them. Now every time I open
> Terminal I get this:

Hopefully someone with better knowledge of MAC OS X, Tiger, Fink and /
or Spotlight will also respond.  But I can explain the "grep" problem.
Which is not a problem with grep at all.

When you say you uninstalled fink and then used Spotlight (I don't
know what any of that means) to find files it looks like you did not
actually uninstall them all.  It looks like you left some files behind
which are grep'ing other non-existent files.  Instead of this
proceedure I recommend that you install and uninstall software using a
package manager.  Then these issues will be handled automatically.
But if you have not installed it using a package manager then it is
already too late to use it to clean up.  In any case, this is not a
problem with grep.  The grep program is behaving correctly.

> Last login: Thu Aug 18 10:35:54 on ttyp1
> Welcome to Darwin!
> grep: /sw/etc/fink.conf: No such file or directory
> grep: /sw/etc/fink.conf: No such file or directory
> 
> I'm not sure if this is a bug or not and I don't know what to do to
> stop it from trying to grep for something that is not there. Thanks
> for any help or bugfix or workaround. A reply would be appreciated.

Somewhere in your login path (that I am not familiar with on MAC OS X)
is a "grep SOMEPATTERN /sw/etc/fink.conf" statement.  You can verify
this yourself.

  grep SOMEPATTERN /sw/etc/fink.conf
  grep: /sw/etc/fink.conf: No such file or directory

I am just using SOMEPATTERN for the example.  In reality it would be
whatever they are grep'ing for in the file.  But it is not shown in
the error message.

Look through your login scripts.  On traditional systems the the shell
source /etc/profile on login and then sources $HOME/.profile.  If I
recall correctly zsh is default on MAC OS X and the zsh man page says
these files are read:

       $ZDOTDIR/.zshenv
       $ZDOTDIR/.zprofile
       $ZDOTDIR/.zshrc
       $ZDOTDIR/.zlogin
       $ZDOTDIR/.zlogout
       /etc/zshenv
       /etc/zprofile
       /etc/zshrc
       /etc/zlogin
       /etc/zlogout

Somewhere in that flow of control is the two grep commands that you
are looking for.

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]