# Read from the file file.txt and output the tenth line to stdout.
cnt=0
while read line && [ $cnt -le 10 ]
do
cnt=`expr $cnt + 1`
if [ $cnt -eq 10 ]
then
echo $line
exit 0
fi
done < file.txt
shell练习
最新推荐文章于 2023-12-23 00:34:32 发布