[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gawk: unexpected behavior, but not a bug
From: |
Eli Zaretskii |
Subject: |
Re: gawk: unexpected behavior, but not a bug |
Date: |
Fri, 20 Jul 2007 12:19:34 +0300 |
> Date: Thu, 19 Jul 2007 18:38:11 +0200
> From: Thomas Schwinge <address@hidden>
> In the end `igli' and `redondos' had an idea:
>
> #v+
> $ awk < data/Main/ThomasSchwinge.txt 'BEGIN { FS = ": "; name = "unknown";
> email = "address@hidden" } { sub("\r$", "") } $1 ~ /\* Name$/ { name = $2 }
> $1 ~ /\* Email$/ { email = $2 } END { print name " <" email ">" }'
> Thomas Schwinge <address@hidden>
> #v-
>
> Who would have thought about that... Not me, for sure.
You mean, that DOS-style CRLF end-of-line is not recognized by Gawk on
Posix systems? If so, that's not a bug, it's a usage error. But if
this was on DOS or on Windows, then this is some kind of bug, so
please post the details in that case.