shell-while循环读取文件内容

运行平台:centos

while循环读取文件
#!/bin/bash
cat a|while read -r line
   do
      echo $line
   done
(使用参数r会屏蔽文本中的特殊符号,只做输出不做转译)

posted @ 2020-07-04 20:27  苍茫宇宙  阅读(1661)  评论(0编辑  收藏  举报