readfile="file.txt"row_num=$(cat ${readfile} | wc -l)if [ ${row_num} -lt 10 ] then echo else sed -n "10p" $readfilefi