2
0
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.
1The 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 – 2012-09-25T22:30:56.770
Yeah, good point. Also, it's only appearing on my MacBook Air, not my Pro, so it is something specific to this computer. – user747488 – 2012-09-25T23:34:18.223
1yeah, 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 – 2012-09-26T00:11:50.363
2You should post your solution as an answer below, and accept it. It will help people that land on this question in the future. – JoshP – 2012-09-26T12:42:10.450