Re: Bug in awk?
From: Bruce Barnett (spamhater113+U051119094427_at_grymoire.com)
Date: 11/19/05
- Next message: Stephane CHAZELAS: "Re: combining the result of processing various commands and setting it in a variable"
- Previous message: Stephane CHAZELAS: "Re: Bug in awk?"
- In reply to: Michael Tosch: "Bug in awk?"
- Next in thread: Michael Tosch: "Re: Bug in awk?"
- Reply: Michael Tosch: "Re: Bug in awk?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 19 Nov 2005 14:44:32 GMT
Michael Tosch <eedmit@NO.eed.SPAM.ericsson.PLS.se> writes:
> Hi,
>
> In Solaris 9:
>
> echo 123.123.123 | /usr/xpg4/bin/awk '
> $1=="123.123.1"{print $1,"is equal to 123.123.1"}'
> gives
> 123.123.123 is equal to 123.123.1
>
> This does not happen with /bin/awk, /bin/nawk, GNU awk,
> and even not with /usr/xpg4/bin/awk in Solaris 8.
>
> Is this a new POSIX standard, or a bug?
Numerically, 123.123.123 == 123.123
Are you SURE you want to compare these two fields numerically?
I would think you wan to compare them as strings...
-- Sending unsolicited commercial e-mail to this account incurs a fee of $500 per message, and acknowledges the legality of this contract.
- Next message: Stephane CHAZELAS: "Re: combining the result of processing various commands and setting it in a variable"
- Previous message: Stephane CHAZELAS: "Re: Bug in awk?"
- In reply to: Michael Tosch: "Bug in awk?"
- Next in thread: Michael Tosch: "Re: Bug in awk?"
- Reply: Michael Tosch: "Re: Bug in awk?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|