1 #!/bin/sh 2 module="device-mapper"3 major=`sed -n -e "/$module\$/p" /proc/devices | awk '{print $1}'`4 echo $major