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]