⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mkshelf.sh

📁 linux 内核源代码
💻 SH
字号:
#! /bin/shif test "$#" != "2"; then	echo "Usage: sh `basename $0` {dir} {shelfaddress}" 1>&2	echo "       n_partitions=16 sh `basename $0` {dir} {shelfaddress}" 1>&2	exit 1fin_partitions=${n_partitions:-16}dir=$1shelf=$2nslots=16maxslot=`echo $nslots 1 - p | dc`MAJOR=152set -eminor=`echo $nslots \* $shelf \* $n_partitions | bc`endp=`echo $n_partitions - 1 | bc`for slot in `seq 0 $maxslot`; do	for part in `seq 0 $endp`; do		name=e$shelf.$slot		test "$part" != "0" && name=${name}p$part		rm -f $dir/$name		mknod -m 0660 $dir/$name b $MAJOR $minor		minor=`expr $minor + 1`	donedone

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -