shell IO

来源:互联网 发布:unity3d 与apk 编辑:程序博客网 时间:2024/05/22 01:28
#!/bin/sh
#
  if [ $# -gt 0 ];
  then
      exec 0 < $1;
  fi
  while read line
  do
        echo $line;
  done<&0;
#通过标准输入循环读取内容
#  exec 0&-;
#解除标准输入绑定
原创粉丝点击