#!/bin/sh
#the fisrt method
while read data
do
echo $data
done < test.info
#the second method
cat test.info | while read line
do
echo $line
done
#the third method
for line in `cat test.info`
do
echo $line
done
#将命令执行的结果赋值给变量的两种方法
#!/bin/sh
#判断当前目录下文件名中包含e字符的
var=$(ls | grep e);
echo $var
++++++++++++++++++++++++++++++++++++++++
#!/bin/sh
var=`ls | grep e`
echo $var