1.使用for循环
for line in `cat filename` do echo $line done
2.使用for循环
for line in $(cat filename) do echo $line done
3.使用while循环
while read -r line do echo $line done < filename
1.使用for循环
for line in `cat filename` do echo $line done
2.使用for循环
for line in $(cat filename) do echo $line done
3.使用while循环
while read -r line do echo $line done < filename