From: Doron Shuldiner on 25 Apr 2010 05:29 Hi, I have an interactive script (non-TCL) that I would like to run from within a TCL program. more specifically, I'm working under Linux OS and would like to run "top" from my TCL program, can it be done? I'm new in TCL but have already looked at many wiki and Forums sites, still I could not find an answer... Could you help?
From: Gerald W. Lester on 25 Apr 2010 08:40 Doron Shuldiner wrote: > Hi, > > I have an interactive script (non-TCL) that I would like to run from > within a TCL program. > more specifically, I'm working under Linux OS and would like to run > "top" from my TCL program, can it be done? > > I'm new in TCL but have already looked at many wiki and Forums sites, > still I could not find an answer... > > Could you help? Yes. Please read the man/help page for the Tcl command exec. Alternatively read the man/help page for the open command and pay particular attention to the section dealing with "filenames" beginning with the pipe ("|") symbol. -- +------------------------------------------------------------------------+ | Gerald W. Lester | |"The man who fights for his ideals is the man who is alive." - Cervantes| +------------------------------------------------------------------------+
From: Russell Treleaven on 25 Apr 2010 11:29 "Gerald W. Lester" <Gerald.Lester(a)cox.net> wrote in message news:6LWAn.294688$Dv7.266987(a)newsfe17.iad... > Doron Shuldiner wrote: >> Hi, >> >> I have an interactive script (non-TCL) that I would like to run >> from >> within a TCL program. >> more specifically, I'm working under Linux OS and would like to run >> "top" from my TCL program, can it be done? >> >> I'm new in TCL but have already looked at many wiki and Forums >> sites, >> still I could not find an answer... >> >> Could you help? > > Yes. > > Please read the man/help page for the Tcl command exec. > Alternatively read the man/help page for the open command and pay > particular attention to the section dealing with "filenames" > beginning with the pipe ("|") symbol. > Also you might benefit from Expect Russell Treleaven
|
Pages: 1 Prev: How to exec a complicated command? Next: Recommended parser / lexer generator? |