I want to launch an interactive tcl script from within a bash script, but when I try, it seems that the standard input channel gets messed up. For example, the following code:
puts -nonewline stdout "What is your name?: "
flush stdout
set name [gets stdin]
returns the following error:
error reading "file0": I/O error while executing "gets stdin"
but only when I launch the tcl script from a bash script. It works fine when I run it directly from bash prompt. Any ideas how to fix this?
puts -nonewline stdout "What is your name?: "
flush stdout
set name [gets stdin]
returns the following error:
error reading "file0": I/O error while executing "gets stdin"
but only when I launch the tcl script from a bash script. It works fine when I run it directly from bash prompt. Any ideas how to fix this?