Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I use iTerm on my MacBook Air and also my MacBook Pro. I've been playing around with .bashrc and .bash_profile and trying to come up with clever ways to configure things. At one point I decided I wanted both this machine and my MacBook Pro to use the same .bash_profile file, so I put it in Dropbox and configured both machines to look there for it.

Somewhere along the way, however, I lost track of everything I did. Now, when I launch iTerm the following three lines print at the top of my screen before my prompt appears:

Last login: Tue Sep 25 16:31:28 on ttys000
configuring from /Users/Joe/Dropbox/private/autosync/.bash_profile
. /Users/Joe/Dropbox/autosync/bash/bashrc

I understand where the first two lines are coming from and what they mean -- the first line of the .bash_profile file in Dropbox/private/autosync/.bash_profile reads as follows:

echo 'configuring from /Users/Joe/Dropbox/private/autosync/.bash_profile'

But I can't figure out why that third line is being printed. My best guess is that I put a similar echo command in another file somewhere that iTerm is also loading, but I don't know which file or where it is or how to find it. I no longer have a file called bashrc in that location. How can I figure out what is causing that line to be printed?

I'm running Mountain Lion (OS X 10.8.1) incidentally.

Sorry for asking such a specific question. The only solution I have come up with so far is to run the following command as root and from the root directory:

grep -lr "Users/Joe/Dropbox/private/autosync/" *

The idea is to find any file on my entire system that contains that sequence of characters, but searching the tens of thousands of files on my system is going to take a very long time.

share|improve this question
The string might not be included in the script that way - it's quite possible that it's created dynamically from your home directory (something like echo . $HOME/Dropbox/private/autosync"). – lxgr Sep 25 '12 at 22:30
Yeah, good point. Also, it's only appearing on my MacBook Air, not my Pro, so it is something specific to this computer. – user747488 Sep 25 '12 at 23:34
yeah, grep didn't find it because $HOME was used. I figured it out, though -- it was the .bash_profile file in my home directory. I guess that's the first place I should have looked. – user747488 Sep 26 '12 at 0:11
You should post your solution as an answer below, and accept it. It will help people that land on this question in the future. – JoshP Sep 26 '12 at 12:42

You must log in to answer this question.

Browse other questions tagged .