X-Spam-Check-By: sourceware.org
Message-ID: <8183547.post@talk.nabble.com>
Date: Fri, 5 Jan 2007 10:45:23 -0800 (PST)
From: fschmidt <fschmidt@gmail.com>
To: cygwin@cygwin.com
Subject: Re: CR/LF problems after upgrade
In-Reply-To: <459E51AA.5020300@byu.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Nabble-From: fschmidt@gmail.com
References: <8174573.post@talk.nabble.com> <012901c730be$ac6ca7f0$0708090a@CAM.ARTIMI.COM> <459E51AA.5020300@byu.net>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com


from http://cygwin.com/ml/cygwin-announce/2006-12/msg00026.html



> 2. d2u is your friend.  You can use it to convert any problematic script
> into binary line endings.
> 

Several people I work with, who are even less technical than I am, use
cygwin and edit scripts with various editors.  So this will not work.



> 3. Cygwin text mounts automatically work with either line ending style,
> because the \r is stripped before bash reads the file.  If you absolutely
> must use files with \r\n line endings, consider mounting the directory
> where those files live as a text mount.  However, text mounts are not as
> well tested or supported on the cygwin mailing list, so you may encounter
> other problems with other cygwin tools in those directories.
> 

I don't know what mounts are, or how to use them.



> 4c. To affect all scripts, export the environment variable BASH_ENV,
> pointing to a file that sets the shell option as desired.  Bash will
> source this file on startup for every script.
> 

I tried:

cd /etc
echo '(set -o igncr) 2>/dev/null && set -o igncr; # comment is needed'
>bash_env
export BASH_ENV=/etc/bash_env

This did not work.



> 4d. Added in the bash-3.2-2 release: export the environment variable
> SHELLOPTS with igncr included in it.  It is read-only from within bash,
> but you can set it before invoking bash; once in bash, it auto-tracks the
> current state of 'set -o igncr' or 'shopt -s igncr'.  If exported, then
> all bash child processes inherit the same option settings.
> 

I tried:

export SHELLOPTS=$SHELLOPTS:igncr

and got:

bash: SHELLOPTS: readonly variable



> 5. You can also experiment with the IFS variable for controlling how bash
> will treat \r during variable expansion.
> 

I don't know what the IFS variable is, or how to use it.

-- 
View this message in context: http://www.nabble.com/CR-LF-problems-after-upgrade-tf2924445.html#a8183547
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/

