"mawk -F '\0' '{print $1}'" doesn't give the expected result
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mawk (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: mawk
'mawk -F '\0' '{print $1}''' doesn't give the expected result.
Mawk version of Ubuntu 10.10.
How to reproduce:
-------
Download the last development version of boot_info_script:
wget -O boot_info_script.sh 'http://
Replace gawk with mawk:
sed -e 's|gawk|mawk|' boot_info_
Copy grldr (grub4dos) file to the root of a drive:
http://
Run boot_info_
sudo bash boot_info_
sudo bash boot_info_
Compare the output files:
diff -u RESULT-
If you also have grub(2) or Syslinux installed, you will see something like this:
=======
@@ -269,30 +269,31 @@
======
------
-p
-c
-d
-t
-
-tI also found tha
-
-
-
-
-
-
-
-
-
+pxe detect
+configfile
+default 0
+timeout 1
+
+title find /menu.lst, /boot/grub/
+ errorcheck off
+ configfile /menu.lst || configfile /MENU.LST
+ configfile /boot/grub/menu.lst || configfile /BOOT/GRUB/MENU.LST
+ configfile /grub/menu.lst || configfile /GRUB/MENU.LST
+ find --set-root --ignore-floppies --ignore-cd /menu.lst && configfile /menu.lst
+ find --set-root --ignore-floppies --ignore-cd /boot/grub/menu.lst && configfile /boot/grub/menu.lst
+ find --set-root --ignore-floppies --ignore-cd /grub/menu.lst && configfile /grub/menu.lst
+ errorcheck on
+ commandline
-t
-
+title commandline
+ commandline
-t
-
+title reboot
+ reboot
+
+title halt
+ halt
-t
-
------
@@ -300,16 +301,16 @@
GiB - GB File Fragment(s)
- 5.718446419 = 6.140135088 boot/grub/core.img 1
- 4.713656705 = 5.061250348 boot/grub/grub.cfg 1
- 4.369430542 = 4.691640320 boot/initrd.
- 4.380689126 = 4.703729133 boot/initrd.
- 4.402975082 = 4.727658496 boot/initrd.
- 5.724097232 = 6.146202603 boot/vmlinuz-
- 5.750058217 = 6.174077998 boot/vmlinuz-
- 5.752313210 = 6.176499278 boot/vmlinuz-
- 4.402975082 = 4.727658496 initrd.img 2
- 4.380689126 = 4.703729133 initrd.img.old 2
- 5.752313210 = 6.176499278 vmlinuz 1
- 5.750058217 = 6.174077998 vmlinuz.old 1
+ 18.498229980 = 19.862323200 boot/grub/core.img 1
+ 8.435592651 = 9.057648640 boot/grub/grub.cfg 1
+ 4.988281250 = 5.356126208 boot/initrd.
+ 5.101032257 = 5.477191680 boot/initrd.
+ 5.324218750 = 5.716836352 boot/initrd.
+ 18.554821014 = 19.923087360 boot/vmlinuz-
+ 18.814811707 = 20.202250240 boot/vmlinuz-
+ 18.837394714 = 20.226498560 boot/vmlinuz-
+ 5.324218750 = 5.716836352 initrd.img 2
+ 5.101032257 = 5.477191680 initrd.img.old 2
+ 18.837394714 = 20.226498560 vmlinuz 1
+ 18.814811707 = 20.202250240 vmlinuz.old 1
=======
You will see that the embedded grub4dos config file is not extracted right (mawk -F '\0').
You can also notice that mawk 1.3.3 calculates the values of "GiB - GB" wrong.
I found a version of mawk, maintained by a new developer:
http://
New mawk changelog (debian patches included + new things):
http://
When I compile this version of mawk and do:
sed -e 's|gawk|
sudo bash boot_info_
diff -u RESULT-
The output of the mawk-1.3.4 and gawk version are exactly the same.
This new version of mawk probably solves a lot of the outstanding bugs on this list too.
Can the last version of mawk-1.3.4 be included in Ubuntu 11.04 and Ubuntu 10.10?
The correct link for the Boot Info Script download is:
wget -O boot_info_script.sh 'http:// bootinfoscript. git.sourceforge .net/git/ gitweb. cgi?p=bootinfos cript/bootinfos cript;a= blob_plain; f=boot_ info_script. sh;hb=0c8e808eb a272af5ef8b5f4d f4654f350526d17 b'