1.基本语法
2.查看文件第十行的数据
a=10
test=$(cat file.txt |wc -l)
if [ "$test" -lt "$a" ]
then
echo ""
else
echo $(cat file.txt | head -10 | tail -1)
fi
head语法
https://blog.csdn.net/signjing/article/details/69357769
3.case语法
read -t 30 -p "qing shuru" num
case "$num" in
"yes")
echo "yes"
;;
"no")
echo "no"
;;
*)
echo "qita"
;;
esac