The following reply was made to PR bin/180328; it has been noted by GNATS.

From: Mark Linimon <[email protected]>
To: [email protected]
Cc:  
Subject: Re: bin/180328: awk(1) fails to treat var as integer
Date: Fri, 5 Jul 2013 17:02:01 -0500

 ----- Forwarded message from Steffen Daode Nurpmeso <[email protected]> -----
 
 Date: Fri, 05 Jul 2013 23:52:45 +0200
 From: Steffen Daode Nurpmeso <[email protected]>
 To: [email protected]
 Subject: Re: bin/180328: awk(1) fails to treat var as integer
 User-Agent: s-nail s-nail-14.3.2-20-g1f64075
 
 Hello.
 uwe@netbsd prodded that i dig a bit deeper and so here is the
 thing a bit narrowed down.  Sorry.
 
  | Please, can you minimize the test case?  As far as I understand it
  | should be reducible to the script and to a single line of input that
  | triggers the problem.
 
 Hmmm.
 
   cat > test.sh <<\!
   printf '1 '; printf "F0000\n" |
   awk '{r2 = r1 = sprintf("%d", "0x" $1); while (r1 <= r2) {print r1; ++r1}}'
   printf '2 '; printf "F0000\n" |
   awk '{r1 = sprintf("%d", "0x" $1); r2 = r1; while (r1 <= r2) {print r1; 
++r1}}'
   printf '3 '; printf "F0000\n" |
   awk '{r1 = sprintf("%d", "0x" $1); while (r1 <= 983040) {print r1; ++r1}}'
   printf '4 '; printf "F0000\n" |
   awk '{r1 = sprintf("%d", "0x" $1); r2 = sprintf("%d", "0x" $1); while (r1 <= 
r2) {print r1; ++r1}}'
   printf '5 '; printf "F0000\n" |
   awk '{r1 = sprintf("%d", "0x" $1); r2 = sprintf("%d", "0x" $1); while (r1 <= 
r2) {print r1; ++r1}}'
   printf '6 '; printf "F0000 F0001\n" |
   awk '{r1 = sprintf("%d", "0x" $1); r2 = sprintf("%d", "0x" $1); while (r1 < 
r2) {print r1; ++r1}}'
   sh ./test.sh
 
 results in
 
   1 983040
   2 983040
   3 983040
   4 983040
   5 983040
   6
 
 So -- indeed.  Sorry.
 
  | -uwe
 
 --steffen
 
 But
 
   $ make ucd; ll test/sa/t_props.dat; make ucd-clean;\
   sed -e 40d -i '' tools/t-base.t; make ucd; ll test/sa/t_props.dat
 
 becomes (when i strip all the other messages)
 
   ucd: ok
   4956 -rw-rw-r--  1 steffen  staff  5071362  5 Jul 23:40 test/sa/t_props.dat
   ucd-clean: ok
   ...
   ucd: ok
   4188 -rw-rw-r--  1 steffen  staff  4284954  5 Jul 23:40 test/sa/t_props.dat
 _______________________________________________
 [email protected] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
 To unsubscribe, send any mail to "[email protected]"
 
 
 ----- End forwarded message -----
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to