|
$ cat temp
hello world
google earth
$ for i in `cat temp`
> do echo $i;
> #需要对 i 做一些事
> done
hello
world
google
earth
但是我要的是这种结果
hello world
google earth
于是我修改temp的内容为
$ cat temp
“hello world”
“google earth”
再跑刚才的脚本,结果却是
“hello
world”
“google
earth”
用for循环我怎样才能得到
“hello world”
“google earth”
的结果啊?
谢谢 |
|