私は本[Linuxデバイスドライバー]のこのスクリプト行を読みました。それは何をするためのものか?
major=$(awk "\\$2= =\"$module\" {print \\$1}" /proc/devices)
文脈のように:
#!/bin/sh
module="scull"
device="scull"
mode="664"
# invoke insmod with all arguments we got
# and use a pathname, as newer modutils don't look in . by default
/sbin/insmod ./$module.ko $* || exit 1
# remove stale nodes
rm -f /dev/${device}[0-3]
major=$(awk "\\$2= =\"$module\" {print \\$1}" /proc/devices)
mknod /dev/${device}0 c $major 0
....