TCL中
set a [exec grep "var" file | head -1]
显示 child killed: write on pipe with no readers
解决办法:
set a [lindex [split [exec grep "var" file] "\n"] 0]
博客主要讲述了在TCL中执行命令“set a [exec grep \var\ file | head -1]”时出现“child killed: write on pipe with no readers”错误,给出的解决办法是使用“set a [lindex [split [exec grep \var\ file] \\\n\] 0]”。
TCL中
set a [exec grep "var" file | head -1]
显示 child killed: write on pipe with no readers
解决办法:
set a [lindex [split [exec grep "var" file] "\n"] 0]
2255