如题所述
#ä»æ件循ç¯è¿å
¥ï¼æ³¨æaaa.txtæ¯è¡ä¸ä¸è½æç©ºæ ¼ï¼ä¸ç¶ä¼æé®é¢
for i in `cat aaa.txt`
do
echo $i
done
#æ°å循ç¯
for i in `seq 1 100`
do
echo $i
done
#whileï¼å¯ä»¥æ è§è¡ä¸çç©ºæ ¼
while read line
do
echo $line
done < aaa.txt
for i in `cat aaa.txt`
do
echo $i
done
#æ°å循ç¯
for i in `seq 1 100`
do
echo $i
done
#whileï¼å¯ä»¥æ è§è¡ä¸çç©ºæ ¼
while read line
do
echo $line
done < aaa.txt
温馨提示:答案为网友推荐,仅供参考