2010年10月31日

shell脚本:一次读取文件的一行【转】

摘要: 写法一:#!/bin/bashwhile read linedo echo $line #这里可根据实际用途变化done < urfile写法二:#!/bin/bashcat urfile | while read linedo echo $linedone注意:以上代码中urfile 为被读取的文件 阅读全文

posted @ 2010-10-31 11:46 nwf 阅读(264) 评论(0) 推荐(0) 编辑

导航