操作系統原理作業(2)在ubuntu中編寫一個shell從文件中讀取每一行顯示並統計總行數

測試文件: 測試的相關代碼: #!/bin/bash while read line do echo $line done < test.txt #!/bin/bash cat test.txt | while read line do echo $line done 在文件夾中加入test.txt和homework.sh 切換到此文件夾 執行方式1: chmod +x ./homework.sh
相關文章
相關標籤/搜索