Hallo,
Am Wed, 20 Jul 2011, Tao te Puh schrieb:
[..]
Das folgende ist eine Zeile !
sudo fdisk -l 2>/dev/null | egrep "Disk /|/dev/" | sed "s#^/dev/#Part
/dev/#" | awk '{print $2}' | sed 's/://' | xargs -n1 -IX sudo sh -c
"hexdump -v -s 0x80 -n 2 -e '2/1 \"%x\" \"\\n\"' X | xargs -n1 -IY
sh -c \"case \"Y\" in '48b4') echo X: GRUB 2 v1.96 ;; 'aa75' |
'5272') echo X: GRUB Legacy ;; '7c3c') echo X: GRUB 2 v1.97 oder
höher ;; *) echo X: Kein GRUB Y ;; esac\""
==== bootinfo.awk [abspeichern und ausführbar machen] ====
#!/usr/bin/gawk -f
# (c)2011 David Haller . License: GPLv2
BEGIN {
while( getline < "/proc/partitions" ) {
if( /[hs]d[a-z][0-9]*/ ) {
dev="/dev/"$4;
cmd="hexdump -v -s 0x80 -n 2 -e '2/1 \"%x\" \"\\n\"' " dev;
cmd | getline;
if( /48b4/ ) { print dev " : GRUB 2 v1.96"; }
if( /aa75|5272/ ) { print dev " : GRUB Legacy"; }
if( /7c3c/ ) { print dev " : GRUB 2 >= v1.97"; }
if( /00/ ) { print dev " : kein GRUB"; }
}
}
}
====
HTH,
-dnh
--
VBScript is designed to be a secure programming environment. It
lacks various commands that can be potentially damaging if used in
a malicious manner. This added security is critical in enterprise
solutions. -- support.microsoft.com
--
Um die Liste abzubestellen, schicken Sie eine Mail an:
opensuse-de+unsubscribe@opensuse.org
Um eine Liste aller verfuegbaren Kommandos zu bekommen, schicken
Sie eine Mail an: opensuse-de+help@opensuse.org