delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/09/27/00:11:39

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
X-Authority-Analysis: v=1.0 c=1 a=io9iQRCaUFYA:10 a=lmpdn1032XHebv8pwkoA:9 a=JgdzH48yaEuR4UtmugEA:7 a=IRlJtT6rLEbzypKLHylebqqE94sA:4 a=QEXdDO2ut3YA:10 a=_HLokNhHElz95lbBB04A:9 a=0kYeVaZ5s8q7v-g7FY8haai1x5AA:4
Message-ID: <4CA00F16.6030407@charter.net>
Date: Sun, 26 Sep 2010 23:27:18 -0400
From: SJ Wright <sjwright68 AT charter DOT net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.24) Gecko/20100228 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: My bash shell suddenly has "X-ray vision"
References: <4C9EA18E DOT 4060903 AT charter DOT net> <4C9FF0FF DOT 3080506 AT cygwin DOT com>
In-Reply-To: <4C9FF0FF.3080506@cygwin.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

--------------000200030904050403000105
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Larry Hall (Cygwin) wrote:
> On 9/25/2010 9:27 PM, SJ Wright wrote:
>> Or is it just the difference in encodings?
>>
>> In scripts and config/convenience files like .bashrc or 
>> .bash_aliases, it can
>>  see *through* "crunches" (#), which are supposed to make a line of text
>> invisible to a shell <or am I wrong on that?>
>>
>> Could it be because I added a LANG variable and have been turning out
>> not-quite-UTF-8 stuff from my one or two text editors? The only guess 
>> I can
>> make with my limited knowledge is that, once UTF8 is set or enabled,
>> ISO-8859-1 "crunches," for all practical purposes, are meaningless to 
>> the
>> shell. or am I wrong on that as well?
>>
>> A little help, please. This isn't making a whole lot of sense. What 
>> good are
>>  rules for comments if, when a new text encoding or environment 
>> variable is
>> applied/undertaken/invoked, they become null and void? (Might as well 
>> go back
>> to REM: from CLI BASIC.)
>
> I suggest you run 'd2u' on the files and see if that helps.  If it 
> does, you
> know that some editing you did on those files introduced DOS/Windows line
> endings.
>
I did something slightly different, inspired by your suggestion. I wrote 
up a quickie script to get the magic number returns from 'find' on all 
my dotfiles. This after running several different combinations of 'cat' 
with options. Re ALL the files in question:  there were *NO* ^M markers 
at the end of any line.  I regard running dos2unix a waste of time if I 
don't see some indication of non-Unix encoding/formatting on a file or 
files ahead of time. And I may not know much but I know what to look 
for. Or maybe you'd prefer to take up the subject of what saves which 
correctly with the developers of Emerald Editor, which I use both in 
Windows and Ubu Linux to compose scripts and edit dotfiles regularly 
when I'm not in the mood for the mouseless approach vi and nano restrict 
one to.

A solution that's not a solution isn't even worth considering (was that 
Einstein or Schrodinger? Maybe it was Dr Moore.)

steve w

Attached is the output to text of that script (which returned as 
"*magic_returns_dotfiles.txt: ASCII text*" one-half second ago).


--------------000200030904050403000105
Content-Type: text/plain;
 name="magic_returns_dotfiles.txt"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="magic_returns_dotfiles.txt"

fi8uWGF1dGhvcml0eTogZW1wdHkKfi8uWGRlZmF1bHRzOiBBU0NJSSB0ZXh0
Cn4vLlhyZXNvdXJjZXM6IExpdHRsZS1lbmRpYW4gVVRGLTE2IFVuaWNvZGUg
dGV4dCwgd2l0aCBDUkxGIGxpbmUgdGVybWluYXRvcnMKfi8uYmFzaF9hbGlh
c2VzOiBBU0NJSSBFbmdsaXNoIHRleHQKfi8uYmFzaF9oaXN0b3J5OiBBU0NJ
SSBFbmdsaXNoIHRleHQKfi8uYmFzaF9wcm9maWxlOiBBU0NJSSBFbmdsaXNo
IHRleHQKfi8uYmFzaHJjOiBBU0NJSSBFbmdsaXNoIHRleHQKfi8uYmxhY2ti
b3hyYzogQVNDSUkgdGV4dAp+Ly5jdXJscmM6IEFTQ0lJIHRleHQKfi8uZ3Rr
LWJvb2ttYXJrczogQVNDSUkgdGV4dAp+Ly5pbXJjOiBBU0NJSSB0ZXh0Cn4v
LmlucHV0cmM6IEFTQ0lJIEVuZ2xpc2ggdGV4dAp+Ly5qd21yYzogWE1MICBk
b2N1bWVudCB0ZXh0Cn4vLm1pbnR0eXJjOiBBU0NJSSB0ZXh0Cn4vLnByb2Zp
bGU6IEFTQ0lJIEVuZ2xpc2ggdGV4dAp+Ly53bWNsaXBoaXN0cmM6IGVtcHR5
Cn4vLnhpbml0cmM6IFBPU0lYIHNoZWxsIHNjcmlwdCB0ZXh0IGV4ZWN1dGFi
bGUKfi8ueHNlcnZlcnJjOiBQT1NJWCBzaGVsbCBzY3JpcHQgdGV4dCBleGVj
dXRhYmxlCn4vLnhzZXNzaW9uOiBBU0NJSSBFbmdsaXNoIHRleHQK


--------------000200030904050403000105
Content-Type: text/plain; charset=us-ascii

--
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
--------------000200030904050403000105--

- Raw text -


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