shell脚本中每次读取文件的一行
2014-04-08 16:01
453 查看
写法一:
#!/bin/bash
while read line
do
echo $line #这里可根据实际用途变化
done < file #需要读取的文件名
_____________________________________________________
写法二:
#!/bin/bash
cat urfile | while read line
do
echo $line
done
#!/bin/bash
while read line
do
echo $line #这里可根据实际用途变化
done < file #需要读取的文件名
_____________________________________________________
写法二:
#!/bin/bash
cat urfile | while read line
do
echo $line
done
相关文章推荐
- shell脚本,每次读取文件的一行,逐行读取并处理
- shell脚本,每次读取文件的一行,逐行读取并处理
- 读取文件的每一行内容并输出 的shell脚本实现
- Shell脚本一次读取文件中一行的2种写法
- 利用Shell脚本循环读取文件中每一行的方法详解
- shell脚本:一次读取文件的一行,并输出
- shell脚本:一次读取文件的一行,并输出
- 每次读取指定目录、指定数量的文件shell脚本
- shell脚本:一次读取文件的一行【转】
- shell脚本:一次读取文件的一行,并输出
- shell脚本中一次读取文件中的一行
- Shell脚本一次读取文件中一行的2种写法
- shell脚本:一次读取文件的一行【转】
- shell脚本:一次读取文件的一行,并输出
- shell脚本:一次读取文件的一行,并输出
- shell脚本中一次读取文件中的一行
- Shell脚本循环读取文件中的每一行
- shell:读取文件的每一行内容并输出
- shell脚本读取文件
- shell脚本按行读取文件并解析