Jeff Schwab wrote:
> elle wrote:
>>
>> On Mar 19, 9:45 am, Jeff Schwab <j...@schwabcenter.com> wrote:
>>> elle wrote:
>>>
>>>> On Mar 19, 9:27 am, Jeff Schwab <j...@schwabcenter.com> wrote:
>>>>> elle wrote:
>>>>>> My ~/.profile has:
>>>>> ...
>>>>>> And my ~/.bash_profile has the following:
>>>>> ...
>>>>>> What rules should I add to it? and where do I add them?
>>>>> You want either a .profile or a .bash_profile, not both.  Once bash sees
>>>>> the .bash_profile, it won't look for the .profile; that's why you're
>>>>> having to source it manually.  From bash(1):
>>>>>      When  bash is invoked as an interactive login shell, or as a
>>>>>      non-inter- active shell with the --login option, it first
>>>>>      reads and executes  com- mands  from  the file /etc/profile,
>>>>>      if that file exists.  After reading that file, it looks for
>>>>>      ~/.bash_profile, ~/.bash_login, and ~/.profile, in  that
>>>>>      order, and reads and executes commands from the first one
>>>>>      that exists and is readable.
>>>>> I actually prefer just to have a .profile, but if you have to support
>>>>> other sh-derivatives, .bash_profile lets you play it safe.
>>>> Thank you for explaining. Just to verify that my path will be set
>>>> correctly, I should change:
>>>> PATH="/opt/subversion/bin:${PATH}"
>>>> export PATH
>>>> to
>>>> PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/opt/
>>>> subversion/bin:${PATH}"
>>>> export PATH
>>>> is that correct?
>>> No; there was no problem with what you had, just that you split it
>>> across two or three files.  You only should have exactly one of
>>> .profile, .bash_profile, and .bash_login.
>>
>> Sorry to be difficult but I actually have all 3 files.
>> Which should I delete?
>> And then, what happens to the information within?
> 
> Concatenate them.  For example, something like:
> 
> cp /dev/null profile
> for f in ~/.profile ~/.bash_login ~/.bash_profile
> do
>      mv $f orig$f
>      cat $f >> profile

Whoops, you'd have to swap those lines.  Warning: I haven't actually run 
this code.

> done
> mv profile ~/.profile


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to