jik:~!1021$ rpm -q gawk gawk-3.1.2-1 jik:~!1022$ stat /proc/mdstat File: `/proc/mdstat' Size: 0 Blocks: 0 IO Block: 4096 regular empty file Device: 2h/2d Inode: 4468 Links: 1 Access: (0444/-r--r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2003-04-11 02:52:24.000000000 -0400 Modify: 2003-04-11 02:52:24.000000000 -0400 Change: 2003-04-11 02:52:24.000000000 -0400 jik:~!1023$ cat /proc/mdstat | awk '{print}' Personalities : [raid1] read_ahead 1024 sectors md0 : active raid1 [dev 08:05][1] hde6[0] 2305152 blocks [2/2] [UU] md1 : active raid1 [dev 08:06][1] hdg4[0] 4096448 blocks [2/2] [UU] md2 : active raid1 [dev 08:07][1] hdg3[0] 264960 blocks [2/2] [UU] md3 : active raid1 [dev 08:08][1] hdg1[0] 3140608 blocks [2/2] [UU] unused devices: <none> jik:~!1024$ awk '{print}' /proc/mdstat jik:~!1025$ Awk is being too smart here. If the file it's told to read is a device rather than a regular file, it shouldn't pay attention to the size indicated in the stat() structure for the file -- it should just open the file and try to read it until it gets EOF.
This is no device, but marked as regular file. Florian La Roche
Fixed in gawk-3.1.2-2, soon in rawhide. Thanks a lot for this bug-report, Florian La Roche