num=0 while read line || [ -n "${line}" ] do

num=[[num + 1] done < nowcoder.txt

while read line || [ -n "line"]doif[{line}" ] do if [ num -le 5 ] && [ numge0]thenechonum -ge 0 ] then echo line fi num=[[num - 1]

done < nowcoder.txt