Re: AWK: adds "^M" at the end of line?
On Mon, Jun 24, 2002 at 03:57:17AM -0400, Abdul Latip wrote:
> I am having problems with my AWK script. It used to work a
> couple of months ago (on potato), but not anymore (on woody).
> I have no idea why, since I seldom use it. I tried both
> mawk and gawk.
>
> Apparently, $0 includes a "^M" character at the end.
> Thus, for an empty line: /^$/ has to be changed to /^.$/ .
> Is there any wrong environment on my system?
>
> Any clue?
What file are you trying to read. If it is mail coming from fetchmail,
there were some change which causes ^M in mail file.
I fixed it by "with stripcr" option in /etc/fetchmailrc.
--
~\^o^/~~~ ~\^.^/~~~ ~\^*^/~~~ ~\^_^/~~~ ~\^+^/~~~ ~\^:^/~~~ ~\^v^/~~~ +++++
Osamu Aoki @ Cupertino CA USA
See "User's Guide": http://www.debian.org/doc/manuals/users-guide/
See "Debian reference": http://www.debian.org/doc/manuals/debian-reference/
"Debian reference" Project at: http://qref.sf.net
I welcome your constructive criticisms and corrections.
--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: