Take a look at the expect extension for tcl/Tk. It was created expressly
for dealing with interactive programs.
On Thu, Jun 30, 2011 at 1:31 PM, Brian St. Pierre wrote:
> On Thu, Jun 16, 2011 at 12:41 PM, Jerry Feldman wrote:
> > One possible solution that seems to work. In my wrapper script:
>
On Thu, Jun 16, 2011 at 12:41 PM, Jerry Feldman wrote:
> One possible solution that seems to work. In my wrapper script:
> --arg1 --arg2 2>&1
>
> And in the tcl script:
>
> if [catch {open "|$command"} input] {
>
> I still get my zombie on the start command, but I query the open file list in
One possible solution that seems to work. In my wrapper script:
--arg1 --arg2 2>&1
And in the tcl script:
if [catch {open "|$command"} input] {
I still get my zombie on the start command, but I query the open file list in
tcl (file channels) and close any open files other than stdxxx.
It
Basically, I didn't know tcl/tk until a week or so ago although I'm
experienced in C/C++/BASH. So, I looked for code that tended to do what
I wanted to do. In this case, the code comes from the exelog.tcl program
that appears in "Practical Programming in TCL and Tk". Brent's
explanation is "If you
> if [catch {open "|$command |& cat"} input] {
Curiosity: why do you pipe it through cat?
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
I am using a tcl/tk script to serve as a GUI for an existing BASH
system. Essentially, most of the buttons go through a single command
processor in tcl.
I set up a command as "script name
"
The code is:
if [catch {open "|$command |& cat"} input] {
.
The script I call is a wrapper BASH script