ls /tmp 返回值做为参数传给read
[root@master ~]# cat t
ls /tmp | while read files
do
echo $files
done
[root@master ~]# ls /tmp/
rsync.log
[root@master ~]# sh t
rsync.log
[root@master ~]# sh -x t
+ ls /tmp
+ read files
+ echo rsync.log
rsync.log
+ read files