📄 checkconf.sh
字号:
#! /bin/sh## $Revision: 1.2 $#### Check the config.data file to make sure there is a tab on every## non-comment line.case $# in*) ;;0) echo "Can't check config.data: wrong number of arguments." 1>&2esac## Get the lines we care about.CONF="$1"shiftsed -e '/^#/d' -e '/^$/d' "${CONF}" >config.x$$## Find the lines with tabs.grep ' ' <config.x$$ >config.y$$## If the lines we care about don't all have tabs, complain.diff config.x$$ config.y$$ >config.z$$if [ -s config.z$$ ] ; then echo The following config parameters have no tabs: ## Work around lack of "-n" in some sed's. grep '<' config.z$$ | sed -e 's/</ /' rm config.[xyz]$$ exit 1fi## Everything's cool.rm config.[xyz]$$exit 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -