我有一个文件file.txt,内容如
i love this world I hate stupid managers I love linux I have MS
当我执行以下操作时:
for line in `cat file.txt`; do echo $line done
它给出了类似的输出
I love this world I .. ..
但我需要输出如下所示的整行 – 任何想法?
i love this world I hate stupid managers I love linux I have MS
while read -r line; do echo "$line"; done < file.txt