摘要:
1 -- SHELL读取文件的方法
#使用read命令读取一行数据
while read myline
do
echo "LINE:"$myline
done datafile.txt
#使用read命令读取一行数据
cat datafile.txt | while read myline
do
echo "LINE:"$myline
done
#读取一行数据
cat datafile.txt | while myline=$(line)
do
echo "LINE:"$myline
done 阅读全文
posted @ 2011-06-24 14:49 Hicome 阅读(507) 评论(0) 推荐(0) 编辑