public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Gawk cr/lf problem
@ 2002-09-08 14:08 Pieter Prinsloo
  0 siblings, 0 replies; 4+ messages in thread
From: Pieter Prinsloo @ 2002-09-08 14:08 UTC (permalink / raw)
  To: cygwin


[-- Attachment #1.1: Type: Text/Plain, Size: 1410 bytes --]

Hi.

Hope this is the correct place for this mail.

I have quite a few awk program-files that ran 
without any problems on gawk prior to 3.1.1 -
I think it was 3.0.4.

During the weekend I upgraded my Cygwin installation
and Gawk 3.1.1-2 is now installed.

But - ALL my program-files created with DOS type editors
and ending in CR/LF now give problems. 
gawk comes back with error 'invalid char' for each ^M.
I have to manually remove the CR at the end of each line to get it to work.
And using vim doesn't help as it accepts the CR/LF 
combination. Effectively I have to open each file as 
a DOS file and save as a Unix type file - or force it
thru FTP to strip the CR's.
All would be fine - except in the field - *nix type editors
ain't allways available and something like wordpad must 
make do. And so the problem continues.

Am I missing something? Is there an environment variable 
that suddenly needs setting?

Oh and yes - I am running gawk in a cmd shell.
But I get the same problem running in bash.

For the time being I'm reverting to the previous version
of Gawk and the cygwin1.dll.

Tx in advance

Kind regards
PwP

Pieter Prinsloo
pexy Systems

old Chinese saying 'Unless we change direction, we are likely to end up
where we are going...' 

Microsoft apparently thinks that R&D stands for 'Rewrap & Disguise'.

[-- Attachment #1.2: Type: Text/HTML, Size: 5795 bytes --]

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><html>
<head>
<meta name="GENERATOR" content="IncrediMail 1.0">
<!--IncrdiXMLRemarkStart>
<IncrdiX-Info>
<X-FID>BA285063-5BCE-11D4-AF8D-0050DAC67E11</X-FID>
<X-FVER>2.0</X-FVER>
<X-FIT>Letter</X-FIT>
<X-FCOL>Elegant Paper</X-FCOL>
<X-FCAT>Stationery</X-FCAT>
<X-FDIS>Rice Fields</X-FDIS>
<X-Extensions>SU1CTDEsNDEsgUmBSTAkkcGNgZmVTY0wNCxNhYUoiU0kOMEoTYGBjYEoJDSZnSyFhUksSU1CTDIsMCwsSU1CTDMsMCws</X-Extensions>
<X-BG>1618057D-E7D8-4318-B69F-F82B33C557FA</X-BG>
<X-BGT>repeat</X-BGT>
<X-BGC>#dce0e3</X-BGC>
<X-BGPX>0px</X-BGPX>
<X-BGPY>0px</X-BGPY>
<X-ASN>ANIM3D00-NONE-0000-0000-000000000000</X-ASN>
<X-ASNF>0</X-ASNF>
<X-ASH>ANIM3D00-NONE-0000-0000-000000000000</X-ASH>
<X-ASHF>1</X-ASHF>
<X-AN>6486DDE0-3EFD-11D4-BA3D-0050DAC68030</X-AN>
<X-ANF>0</X-ANF>
<X-AP>6486DDE0-3EFD-11D4-BA3D-0050DAC68030</X-AP>
<X-APF>1</X-APF>
<X-AD>C3C52140-4147-11D4-BA3D-0050DAC68030</X-AD>
<X-ADF>0</X-ADF>
<X-AUTO>X-ASN,X-ASH,X-AN,X-AP,X-AD</X-AUTO>
<X-CNT>;</X-CNT>
</IncrdiX-Info>
<IncrdiXMLRemarkEnd-->

</head>
<BODY background=cid:1618057D-E7D8-4318-B69F-F82B33C557FA bgColor=#dce0e3 scroll=yes style="BACKGROUND-POSITION: 0px 0px; FONT-SIZE: 12pt; MARGIN: 0px 10px 10px; BACKGROUND-REPEAT: repeat; FONT-FAMILY: Comic Sans MS" text="#000040" X-FDIS="Rice Fields" X-FCOL="Elegant Paper" X-FCAT="Elegant Paper" X-FIT="Letter" X-ADF="0" X-AD="C3C52140-4147-11D4-BA3D-0050DAC68030" X-APF="1" X-AP="6486DDE0-3EFD-11D4-BA3D-0050DAC68030" X-ANF="0" X-AN ="6486DDE0-3EFD-11D4-BA3D-0050DAC68030" X-ASHF ="1" X-ASH="ANIM3D00-NONE-0000-0000-000000000000" X-ASNF="0" X-ASN="ANIM3D00-NONE-0000-0000-000000000000" X-FVER="2.0" X-FID="BA285063-5BCE-11D4-AF8D-0050DAC67E11" SIGCOLOR="0" ORGYPOS="0"><TABLE border=0 cellPadding=2 cellSpacing=0 id=INCREDIMAINTABLE width="95%">
<TBODY>

<TR>

<TD id=INCREDITEXTREGION style="PADDING-RIGHT: 7px; PADDING-LEFT: 7px; FONT-SIZE: 10pt; FONT-FAMILY: Comic Sans MS" 
    width="100%">
      <DIV>Hi.</DIV>
      <DIV>&nbsp;</DIV>
      <DIV>Hope this is the correct place for this mail.</DIV>
      <DIV>&nbsp;</DIV>
      <DIV>I have quite a few awk program-files that ran </DIV>
      <DIV>without any problems on gawk prior to 3.1.1 -<BR>I think it was 
      3.0.4.</DIV>
      <DIV>&nbsp;</DIV>
      <DIV>During the weekend I upgraded my Cygwin installation</DIV>
      <DIV>and Gawk 3.1.1-2 is now installed.</DIV>
      <DIV>&nbsp;</DIV>
      <DIV>But - ALL my program-files created with DOS type editors</DIV>
      <DIV>and ending in CR/LF now give problems. </DIV>
      <DIV>
      <DIV>gawk comes back with error 'invalid char' for each ^M.</DIV>I have to 
      manually remove the CR at the end of each line to get it to work.</DIV>
      <DIV>And using vim doesn't help as it accepts the CR/LF </DIV>
      <DIV>combination. Effectively I have to open each file as </DIV>
      <DIV>a DOS file and save as a Unix type file - or force it</DIV>
      <DIV>thru FTP to strip the CR's.</DIV>
      <DIV>All would be fine - except in the field - *nix type editors</DIV>
      <DIV>ain't allways available and something like wordpad must </DIV>
      <DIV>make do. And so the problem continues.</DIV>
      <DIV>&nbsp;</DIV>
      <DIV>Am I missing something? Is there an environment variable </DIV>
      <DIV>that suddenly needs setting?</DIV>
      <DIV>&nbsp;</DIV>
      <DIV>Oh and yes - I am running gawk in a cmd shell.</DIV>
      <DIV>But I get the same problem running in bash.</DIV>
      <DIV>&nbsp;</DIV>
      <DIV>For the time being I'm reverting to the previous version</DIV>
      <DIV>of Gawk and the cygwin1.dll.</DIV>
      <DIV>&nbsp;</DIV>
      <DIV>Tx in advance</DIV>
      <DIV>&nbsp;</DIV>
      <DIV>Kind regards</DIV>
      <DIV>PwP</DIV>
      <DIV>&nbsp;</DIV>
      <DIV>
      <TABLE id=INCREDIMAINTABLE cellSpacing=0 cellPadding=0 width="95%" 
      border=0>
        
        <TR>
          <TD id=INCREDITEXTREGION 
          style="PADDING-RIGHT: 7px; PADDING-LEFT: 7px; FONT-SIZE: 10pt; FONT-FAMILY: Arial" 
          width="100%">
            <P>Pieter Prinsloo<BR>pexy Systems<BR></P>
            <P>old Chinese saying 'Unless we change direction, we are likely to 
            end up where we are going...' </P></TD></TR>
        <TR>
          <TD id=INCREDIFOOTER width="100%">
            <TABLE cellSpacing=0 cellPadding=0 width="100%">
              
              <TR>
                <TD width="100%"></TD>
                <TD id=INCREDISOUND vAlign=bottom align=middle></TD>
                <TD id=INCREDIANIM vAlign=bottom 
            align=middle></TD></TR></TABLE>Microsoft apparently thinks 
            that R&amp;D stands for 'Rewrap &amp; 
      Disguise'.</TD></TR></TABLE><FONT 
      face="Arial, Helvetica, sans-serif" size=2></FONT></DIV></TD></TR>
<TR>
<TD id=INCREDIFOOTER width="100%">
<TABLE cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD width="100%"></TD>
<TD align=middle id=INCREDISOUND vAlign=bottom></TD>
<TD align=middle id=INCREDIANIM vAlign=bottom></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><SPAN 
id=IncrediStamp><SPAN dir=ltr><FONT face="Arial, Helvetica, sans-serif" 
size=2>____________________________________________________<BR><FONT 
face="Comic Sans MS" size=2><A 
href="http://www.incredimail.com/redir.asp?ad_id=309&amp;lang=9"><IMG alt="" 
hspace=0 src="cid:4521F408-56E7-4E09-B572-1D6FAB5BB57B" align=baseline 
border=0></A>&nbsp; <I>IncrediMail</I> - <B>Email has finally evolved</B> - 
</FONT><A href="http://www.incredimail.com/redir.asp?ad_id=309&amp;lang=9"><FONT 
face="Times New Roman" size=3><B><U>Click 
Here</U></B></FONT></A></SPAN></SPAN></FONT></BODY></html>

[-- Attachment #2: Type: image/gif, Size: 494 bytes --]

[-- Attachment #3: Type: Image/jpeg, Size: 1431 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Gawk cr/lf problem
       [not found] <3D7CFD53.000001.01168@pexy>
  2002-09-09 13:11 ` Joshua Daniel Franklin
@ 2002-09-09 13:12 ` Joshua Daniel Franklin
  1 sibling, 0 replies; 4+ messages in thread
From: Joshua Daniel Franklin @ 2002-09-09 13:12 UTC (permalink / raw)
  To: Pieter Prinsloo; +Cc: cygwin


--- Pieter Prinsloo <pietp.pexy@megawan.net> wrote:
> Hi.
> 
> Let me get this straight.
> 
> 1) Whoever writes the program files using whatever editor in windows.
> 2) Now before we can use those program files it must
> first be converted using dos2unix?
> 3) Now what will be the next step??
> Before we use windows text files we have to convert them like we did 10
> years ago, when we used awk in a *nix environment?
> 4) I fail to see this point. Why should the program files be
> in *nix format - will this eventually apply to other
> source files like "C" as well?
> 5) Now we have to physically QA each source program file
> to make sure its in *nix format on winbloze machines!
> 6) Why change the concept of using M$ dos terminated files
> as is?
> 
> Please bear with me - I do NOT like M$. 
> But I do not understand this change in the behaviour of awk.
> 
> -------Original Message-------
> 
> From: Joshua Daniel Franklin
> Date: Monday, 09 September, 2002 21:41:38
> To: pietp.pexy@megawan.net; cygwin@cygwin.com
> Subject: Re: Gawk cr/lf problem
> 
> > But - ALL my program-files created with DOS type editors
> > and ending in CR/LF now give problems.
> > gawk comes back with error 'invalid char' for each ^M.
> > I have to manually remove the CR at the end of each line to get it to work
> 
> 
> ...
> 
> > Am I missing something? 
> 
> Yes. dos2unix from the cygutils package. 
> It will automatically convert your old files for you. 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Finance - Get real-time stock quotes
> http://finance.yahoo.com
> 
> .


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Gawk cr/lf problem
       [not found] <3D7CFD53.000001.01168@pexy>
@ 2002-09-09 13:11 ` Joshua Daniel Franklin
  2002-09-09 13:12 ` Joshua Daniel Franklin
  1 sibling, 0 replies; 4+ messages in thread
From: Joshua Daniel Franklin @ 2002-09-09 13:11 UTC (permalink / raw)
  To: Pieter Prinsloo; +Cc: cygwin

> Please bear with me - I do NOT like M$. 
> But I do not understand this change in the behaviour of awk.

Sorry, I didn't make the changes in gawk. 
I was just giving a suggestion on a way to work around it. 

__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Gawk cr/lf problem
@ 2002-09-09 13:02 Joshua Daniel Franklin
  0 siblings, 0 replies; 4+ messages in thread
From: Joshua Daniel Franklin @ 2002-09-09 13:02 UTC (permalink / raw)
  To: pietp.pexy, cygwin

> But - ALL my program-files created with DOS type editors
> and ending in CR/LF now give problems.
> gawk comes back with error 'invalid char' for each ^M.
> I have to manually remove the CR at the end of each line to get it to work.

...

> Am I missing something? 

Yes. dos2unix from the cygutils package. 
It will automatically convert your old files for you. 

__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-09-09 20:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-08 14:08 Gawk cr/lf problem Pieter Prinsloo
2002-09-09 13:02 Joshua Daniel Franklin
     [not found] <3D7CFD53.000001.01168@pexy>
2002-09-09 13:11 ` Joshua Daniel Franklin
2002-09-09 13:12 ` Joshua Daniel Franklin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).