描述
打印文件的第十行内容
解决
迭代
# Read from the file file.txt and output the tenth line to stdout
count=1
cat file.txt | while read line
do
if [ $count -eq 10 ]
then
echo "$line"
break
else
count=$[ $count + 1 ]
fi
done