This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Combining path components




Ken Brown-6 wrote:
> 
> On 1/3/2012 9:32 PM, Radly wrote:
>>
>> I just installed Cygwin, which I've used off and on since it was created.
>> I've been using MinGw for several months and have a .bashrc file that
>> sets
>> up some environment variables for me to reduce the typing in some routine
>> tasks.  The file has the following form, after modifying the first line
>> from
>> MinGw's format to Cygwin's:
>>
>> export DD=/cygdrive/D/Common
>> export LL=$DD/labs
>>
>> The intent is to make $LL refer to /cygdrive/D/Common/labs.  If I execute
>> those commands at the bash prompt, I get the desired effect:
>>
>> "echo $LL" produces "/cygdrive/D/Common/labs"
>>
>> But when I do
>> $ . .bashrc  (or ./.bashrc, either one)
>> $ echo $LL
>>
>> I get
>> /labsrive/D/Common
>>
>> instead of
>> /cygdrive/D/Common/labs
>>
>> When I experiment with various paths for DD and LL, I see the following
>> pattern.  The beginning of the DD string is overwritten with the LL
>> string.
>> For instance, DD=/abcdef/ghi/jklmn; LL=/opqr yields
>> $LL=/opqref/ghi/jklmn.
> 
> Do you have CRLF line endings in your .bashrc?  Try running dos2unix on
> it.
> 
> Ken
> 
> 

And that would be it!  Thanks.  I haven't had that problem in a long, long
time, and had forgotten how weirdly it could manifest itself.  Thanks again!
-- 
View this message in context: http://old.nabble.com/Combining-path-components-tp33076579p33076910.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]