1、新建文件 test.txt 11 22 33 2、按行读文件 for line in $(<file); do echo $line done 参考链接 https://www.cnblogs.com/guosj/p/4904799.html