delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/05/08/13:27:44

X-Spam-Check-By: sourceware.org
Message-ID: <10380192.post@talk.nabble.com>
Date: Tue, 8 May 2007 10:26:36 -0700 (PDT)
From: David Partridge <david DOT partridge AT dharma DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Trouble with export
In-Reply-To: <20070508164735.GA22873@trixie.casa.cgf.cx>
MIME-Version: 1.0
X-Nabble-From: david DOT partridge AT dharma DOT com
References: <10379395 DOT post AT talk DOT nabble DOT com> <20070508164735 DOT GA22873 AT trixie DOT casa DOT cgf DOT cx>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Right you are.  dos2unix fixed it.  Thanks!

Dave

Christopher Faylor-8 wrote:
> 
> On Tue, May 08, 2007 at 09:40:32AM -0700, David Partridge wrote:
>>I just installed cygwin (1.5.24-2) on a Windows Vista machine.
>>When I execute a script file to set my environment variables,
>>they look okay but don't actually work correctly.  The following
>>example shows the difference between what happens when I execute
>>the export command directly from bash and from the script.
>>Note that the simple echo command appears to show that everything
>>is fine, but the cd command fails, and when leading and trailing
>>characters are echoed the variable defined in the script strangely
>>shows up after the trailing characters.  I cut and paste the
>>export command straight from the script file (both from the screen
>>print and from withing vi), but it still always works from the
>>command line and fails from the prompt.  This used to work just
>>fine on an older version of cygwin running on windows XP.  I've
>>recreated new test scripts from within cygwin to make sure there
>>weren't any extra control characters, but that doesn't help.
>>
>>Any thoughts on what to try next would be greatly appreciated!
>>
>>$ cat set1
>>export FRED=mydir
>>
>>blah AT blah /cygdrive/c
>>$ export FRED=mydir
>>
>>blah AT blah /cygdrive/c
>>$ cd $FRED
>>
>>blah AT blah /cygdrive/c/mydir
>>$ echo $FRED
>>mydir
>>
>>blah AT blah /cygdrive/c/mydir
>>$ echo "##"$FRED"**"
>>##mydir**
>>
>>blah AT blah /cygdrive/c/mydir
>>$ cd ..
>>
>>blah AT blah /cygdrive/c
>>$ . ./set1
>>
>>blah AT blah /cygdrive/c
>>$ cd $FRED
>>: No such file or directory
>>
>>blah AT blah /cygdrive/c
>>$ echo $FRED
>>mydir
>>
>>blah AT blah /cygdrive/c
>>$ echo "##"$FRED"**"
>>**mydir
>>
>>blah AT blah /cygdrive/c
>>$ exit
> 
> I'd wager that "./set1" has \r\n line endings.  Running it through
> dos2unix should fix it.
> 
> cgf
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Trouble-with-export-tf3710761.html#a10380192
Sent from the Cygwin Users mailing list archive at Nabble.com.


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019