# Simple tcl client to connect to openocdputs"Use empty line to exit"setfo[socket127.0.0.16666]puts-nonewlinestdout"> "flushstdout
while{[getsstdinline]>=0}{if{$lineeq{}}break
puts$fo$lineflush$fogets$foline
puts$lineputs-nonewlinestdout"> "flushstdout
}close$fo