jsnjzlw 发表于 2018-8-20 08:05:35

shell exec

  echo 1234567890 > File    # 写字符串到"File".
  exec 3 File             # 打开"File"并且给它分配fd 3.
  read -n 4 &3             # 写一个小数点.
  exec 3>&-               # 关闭fd 3.
  cat File                  # ==> 1234.67890
  http://blog.163.com/xjming487@126/blog/static/212951352009101984030123/

页: [1]
查看完整版本: shell exec